This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Target hooks for exception and eh frame sections
Stan Shebs wrote:-
> > I'm pretty sure that the #if..#endif is unnecessary here - at least
> > the rest of the file is designed that way. The idea is that all
> > interested files #include "target-def.h" and then redefine anything
> > they want to override. If you agree would you remove them as they
> > just clutter things up?
>
> Alas, they prove to be necessary. The problem is that TARGET_foo
> definitions in <arch>.c are only possible for definitions that
> are the same for all operating systems. OS-specific definitions
> must (for now anyway) live in <arch>/<os>.h, which gets included
> before target-def.h in <arch>/<arch>.c.
>
> I didn't want to add those ifndefs either, but testing reminded me
> of the hard realities of the situation... :-(
>
> One way to solve might be to try to include target-def.h before
> config.h, but that seems hard to get right.
Ah, OK, thanks for the explanation.
Could you add a one or two line comment to that effect just above the
first #if to remind over-zealous junk removers like me? 8^)
Thanks,
Neil.