[Toybox] [PATCH] Shut up GCC 3.4 on musl
Rob Landley
rob at landley.net
Sat Jan 25 18:20:58 PST 2014
On 01/25/2014 07:52 PM, Isaac Dunham wrote:
> Two changes to shut up GCC:
> * __GLIBC__ was checked unconditionally;
> this made for a very messy build on musl.
According to my C99 draft section 6.10.1.3:
After all replacements due to macro expansion and the defined unary
operator have been performed, all remaining identifiers are replaced
with the pp-number 0, and then each preprocessing token is converted
into a token.
That seems like a broken compiler? Still, portability.h is the place to
workaround that kind of breakage. But I'd prefer to isolate it to its
own stanza that blames the right thing so when we no longer care about
gcc 3.4 know to remove it instead of having Magic Thing.
I'll do some variant of:
#ifdef gcc 3.4
#ifndef _GLIBC_
#define _GLIBC_ 0
#endif
#endif
> * int fd in chvt is always initialized; GCC 3.4 does not recognize this.
That's also a broken compiler, but I'm already doing the "int x = x;"
trick in several places to shut gcc's brain damage up, so that's not new
evil...
Rob
More information about the Toybox
mailing list