VirtualBox

Changeset 2083

Show
Ignore:
Timestamp:
04/13/07 18:20:00 (2 years ago)
Author:
vboxsync
Message:

Made AssertCompile? work more reliably on gcc. (only tested with 4.1.1, hope it works with 3.x too)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/include/iprt/assert.h

    r1454 r2083  
    7979 */ 
    8080#ifdef __GNUC__ 
    81 # define AssertCompile(expr)    extern int RTASSERTVAR[(expr) ? 1 : 0] __attribute__((unused)) 
     81# define AssertCompile(expr)    extern int RTASSERTVAR[1] __attribute__((unused)), RTASSERTVAR[(expr) ? 1 : 0] __attribute__((unused)) 
    8282#else 
    8383# define AssertCompile(expr)    typedef int RTASSERTTYPE[(expr) ? 1 : 0] 

© 2008 Sun Microsystems, Inc.
ContactPrivacy policy