Don't define a bare "mips" macro for VxWorks

Richard Sandiford richard@codesourcery.com
Fri Aug 10 18:04:00 GMT 2007


"Maciej W. Rozycki" <macro@linux-mips.org> writes:
> On Fri, 10 Aug 2007, Richard Sandiford wrote:
>> Although it's probably not wise of the headers to rely on identifiers
>> like 'mips' not being macros, I think gcc's definition of 'mips' is even
>> less sound.  I'd get rid of it for all MIPS targets if I thought it was safe.
>> I don't think it is safe though, so this patch just stops the definition
>> for VxWorks.
>
>  Oh, I have seen clauses like #if defined(mips) in several places (X11 
> comes to mind).  Though admittedly they are normally a warning sign of 
> somebody assuming MIPS == RISC/os.

OK, thanks for the pointer; it's useful to have a specific example of
a sourcebase that uses the macro.  That makes me even more convinced
that the patch is doing the right thing.

Richard



More information about the Gcc-patches mailing list