Message ID | AANLkTint25UQMn=Q5_d7QP7p4_7h3Wz5ks5eyPJMyYF=@mail.gmail.com |
---|---|
State | New |
Headers | show |
Hello, * Mingjie Xing wrote on Mon, Nov 29, 2010 at 08:47:55AM CET: > 2010/11/28 Ehren Metcalfe <ehren.m@gmail.com>: > >>> the include order should generally start > >>> > >>> #include "config.h" > >>> #include "system.h" > >>> #include "coretypes.h" > > I prepared a patch to include "coretypes.h" in gcc-plugin.h. > > In file included from > > /home/ehren/gcc-trunk/dist/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/plugin/include/basic-block.h:26, > > from plugin_test.c:13: > > /home/ehren/gcc-trunk/dist/lib/gcc/x86_64-unknown-linux-gnu/4.6.0/plugin/include/function.h:29:26: > > error: hard-reg-set.h: No such file or directory > > Hmm, maybe this is introduced by Revision 159746, which removes > hard-reg-set.h from BASIC_BLOCK_H, while BASIC_BLOCK_H is included in > PLUGIN_HEADERS. Thus hard-reg-set.h is missing in PLUGIN_HEADERS. But then why is hard-reg-set.h not listed in FUNCTION_H? Generally, the *_H make macros in gcc/Makefile.in should correspond to directly included headers only (with some set of exceptions that I haven't really grokked yet, sorry). Thanks, Ralf > The > following patch simply fixes it. > > Bootstrapped on ia64-redhat-linux and i486-linux-gnu. Is it OK? > 2010-11-29 Mingjie Xing <mingjie.xing@gmail.com> > > * gcc-plugin.h: Include coretypes.h. > * Makefile.in (PLUGIN_HEADERS): Add hard-reg-set.h.
Index: gcc-plugin.h =================================================================== --- gcc-plugin.h (revision 167194) +++ gcc-plugin.h (working copy) @@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. #include "config.h" #include "system.h" +#include "coretypes.h" #include "highlev-plugin-common.h" #include "hashtab.h" Index: Makefile.in =================================================================== --- Makefile.in (revision 167194) +++ Makefile.in (working copy) @@ -4563,7 +4563,7 @@ PLUGIN_HEADERS = $(TREE_H) $(CONFIG_H) $ intl.h $(PLUGIN_VERSION_H) $(DIAGNOSTIC_H) $(C_COMMON_H) $(C_PRETTY_PRINT_H) \ tree-iterator.h $(PLUGIN_H) $(TREE_FLOW_H) langhooks.h incpath.h debug.h \ $(EXCEPT_H) tree-ssa-sccvn.h real.h output.h $(IPA_UTILS_H) \ - $(C_PRAGMA_H) $(CPPLIB_H) $(FUNCTION_H) \ + $(C_PRAGMA_H) $(CPPLIB_H) $(FUNCTION_H) hard-reg-set.h\ cppdefault.h flags.h $(MD5_H) params.def params.h prefix.h tree-inline.h \ $(IPA_PROP_H) $(RTL_H) $(TM_P_H) $(CFGLOOP_H) $(EMIT_RTL_H) version.h