Re: include: Fix the C_ASSERT macro to not generate an unused variable warning when compiling with gcc.
15 Feb
2008
15 Feb
'08
10:52 a.m.
Robert Shearman <rob(a)codeweavers.com> writes:
@@ -279,10 +279,10 @@ extern "C" {
/* Compile time assertion */
-#if defined(_MSC_VER) +#if defined(_MSC_VER) || defined(__GNUC__) # define C_ASSERT(e) typedef char __C_ASSERT__[(e)?1:-1] -#elif defined(__GNUC__) -# define C_ASSERT(e) extern char __C_ASSERT__[(e)?1:-1] +#else +# define C_ASSERT(e)
This will break if you do two C_ASSERTs in the same scope. -- Alexandre Julliard julliard(a)winehq.org
6515
Age (days ago)
6515
Last active (days ago)
0 comments
1 participants
participants (1)
-
Alexandre Julliard