This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [3.1-branch PATCH] fix mips CPP size specs for MEABI.
- From: Neil Booth <neil at daikokuya dot demon dot co dot uk>
- To: Zack Weinberg <zack at codesourcery dot com>
- Cc: Eric Christopher <echristo at redhat dot com>, cgd at broadcom dot com,Mark Mitchell <mark at codesourcery dot com>,"gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>,"aoliva at gcc dot gnu dot org" <aoliva at gcc dot gnu dot org>
- Date: Sat, 4 May 2002 21:44:17 +0100
- Subject: Re: [3.1-branch PATCH] fix mips CPP size specs for MEABI.
- References: <yov5y9fatjxj.fsf@broadcom.com> <165730000.1019844797@gandalf.codesourcery.com> <yov5vgaetizv.fsf@broadcom.com> <20020426205837.GA14461@daikokuya.demon.co.uk> <1019875080.3713.38.camel@ghostwheel.cygnus.com> <20020427063902.GA21121@daikokuya.demon.co.uk> <20020504201222.GA15895@daikokuya.demon.co.uk> <20020504203201.GB2088@codesourcery.com>
Zack Weinberg wrote:-
> > OK, I've done it with the patch below. It should now be trivial
> > to handle target-specific CPP built-in macros.
>
> This is going to cause problems for front ends that don't link against
> cpplib. It needs to be handled more like the hooks to define target-
> specific pragmas.
Ah yes, once the target hooks are actually written. Sigh.
I've never looked at how the pragmas are done. It appears that it's
through a whole bunch of macros and conditional compilation, right?
How about instead of putting the prototypes in c-lex.h like I did,
making them langhooks? The default does nothing, and the C family
front ends pass them on to cpplib. I think the pragmas would be
better done that way too. The cost to non-C front ends could be
easily avoided by testing a langhook boolean "c_family_p" before
doing the pragmas and macros / assertions.
Does that sound workable? It might clean up some of the current
pragma messiness too.
Neil.