This is the mail archive of the
mailing list for the GCC project.
Re: [PATCH] Fix missing headers for plugin [was Miss head file diagnostic.h in plugin.h?]
- From: Ralf Wildenhues <Ralf dot Wildenhues at gmx dot de>
- To: Mingjie Xing <mingjie dot xing at gmail dot com>
- Cc: gcc-patches at gcc dot gnu dot org, "Joseph S. Myers" <joseph at codesourcery dot com>, Ehren Metcalfe <ehren dot m at gmail dot com>
- Date: Mon, 29 Nov 2010 23:38:50 +0100
- Subject: Re: [PATCH] Fix missing headers for plugin [was Miss head file diagnostic.h in plugin.h?]
- References: <AANLkTint25UQMn=Q5_d7QP7p4_7h3Wz5ks5eyPJMyYFfirstname.lastname@example.org>
* Mingjie Xing wrote on Mon, Nov 29, 2010 at 08:47:55AM CET:
> 2010/11/28 Ehren Metcalfe <email@example.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).
> following patch simply fixes it.
> Bootstrapped on ia64-redhat-linux and i486-linux-gnu. Is it OK?
> 2010-11-29 Mingjie Xing <firstname.lastname@example.org>
> * gcc-plugin.h: Include coretypes.h.
> * Makefile.in (PLUGIN_HEADERS): Add hard-reg-set.h.