http://gcc.gnu.org/bugzilla/show_bug.cgi?id=46902
--- Comment #16 from Iain Sandoe <iains at gcc dot gnu.org> 2010-12-14 14:34:59 UTC --- this is a fix (but, clearly, there's something fragile here). #include <dlfcn.h> includes <stdbool.h> I'm not sure why that should cause a problem since the translation of bool to int should not be active for gcc >= 3 : #define bool _Bool #if __STDC_VERSION__ < 199901L && __GNUC__ < 3 typedef int _Bool; #endif ==== Index: gcc/plugin.c =================================================================== --- gcc/plugin.c (revision 167762) +++ gcc/plugin.c (working copy) @@ -22,6 +22,13 @@ along with GCC; see the file COPYING3. If not see #include "config.h" #include "system.h" +#include "coretypes.h" +#include "diagnostic-core.h" +#include "tree.h" +#include "tree-pass.h" +#include "intl.h" +#include "timevar.h" +#include "ggc.h" /* If plugin support is not enabled, do not try to execute any code that may reference libdl. The generic code is still compiled in to @@ -31,14 +38,7 @@ along with GCC; see the file COPYING3. If not see #include <dlfcn.h> #endif -#include "coretypes.h" -#include "diagnostic-core.h" -#include "tree.h" -#include "tree-pass.h" -#include "intl.h" #include "plugin.h" -#include "timevar.h" -#include "ggc.h" #ifdef ENABLE_PLUGIN #include "plugin-version.h"