On Mon, Jun 8, 2015 at 2:07 PM, Andrew MacLeod <amacl...@redhat.com> wrote:
> During the original flattening process I decided to use gcc-plugin.h as the
> kitchen sink for all includes that plugins might need.  I think this has
> worked well for plugins, drastically reducing their dependency on gcc
> internal header file structure.
>
> What I didn't realize was that gcc's internal header (plugin.h) also
> includes gcc-plugin.h. This means that every file which may need to do
> something for plugins ends up indirectly including the gcc world again :-P
>
> Easy fix. (ha). This patch leaves all the #includes in gcc-plugin.h making
> the change transparent to plugins.  All the remaining declarations and such
> are moved into a new file gcc-plugin-common.h.  Both gcc-plugin.h and gcc's
> internal header plugin.h now include this common file.
>
> The effect is that gcc's source files no longer get anything but the
> required plugin info.  Great.. Except there were a few files which were
> apparently picking up some required headers from gcc-plugins.h :-P    This
> patch also adds the required headers to those source files.
>
> Compiles on x86_64-unknown-linux-gnu with no new regressions. Also compiles
> across all targets in config-list.mk.   OK for trunk?

Err - why not simply remove the gcc-plugin.h include from plugin.h and instead
include plugin.h from gcc-plugin.h?

Richard.

> Andrew
>

Reply via email to