[Patch] Fix __mips16 undef macro warnings.
Joseph S. Myers
joseph@codesourcery.com
Tue Apr 29 21:00:00 GMT 2014
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
More information about the Libc-alpha
mailing list