http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48851
--- Comment #17 from Richard Guenther <rguenth at gcc dot gnu.org> 2011-06-30 12:57:10 UTC --- #ifndef NULL #ifdef __GNUG__ #define NULL __null #else #define NULL ((void *)0) #endif #endif isn't providing a C++ conforming NULL for non-GCC C++ compilers (who do not define __GNUG__). A more conforming version would be #ifdef __GNUG__ #define NULL __null #else #ifndef __cplusplus #define NULL ((void *)0) #else #define NULL 0 #endif #endif