This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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: [Patch] Fix __mips16 undef macro warnings.


On Tue, 29 Apr 2014, Carlos O'Donell wrote:

> * In a central mips header:
> 
> /* Long description about this coming from the compiler and
>    indicating that it will not be defined when not compiling
>    MIPS16.  */
> #ifdef __mips16
> #define __glibc_mips16 1
> #else
> #define __glibc_mips16 0
> #endif

longlong.h is shared, so a central header defining __glibc_* macros makes 
no sense whatsoever.

There may be cases for converting compiler-defined macros to glibc-defined 
macros with the 0/1 convention (e.g. replacing tests of __ARM_ARCH_* with 
tests of __ARM_ARCH and defining that if the compiler is too old to define 
it itself), but this isn't one of them.  And generally, if a simple 
defined/undefined test is sufficient for the relevant condition, I think 
defining a 0/1 macro is overkill.

-- 
Joseph S. Myers
joseph@codesourcery.com


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