This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [3.1-branch PATCH] fix mips CPP size specs for MEABI.


On Sat, May 04, 2002 at 09:44:17PM +0100, Neil Booth wrote:
> 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?

Right.  The callbacks live in a file conventionally named
config/ARCH/ARCH-c.c, and get registered by the macro
REGISTER_TARGET_PRAGMAS, which is called from init_pragma() in
c-pragma.c.  I don't think there is anything terribly wrong with this
scheme.  To duplicate it for target #defines, you could just create a
macro called REGISTER_TARGET_DEFINES called in place of your target
hook.

zw


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]