Mail Archives: cygwin/1999/11/30/21:53:18
In a message dated 11/30/99 9:02:27 AM Pacific Standard Time,
cygnus AT ncohafmuta DOT com writes:
> In ctype.h:
>
> #ifdef __GNUC__
> # define toupper(c) \
> ({ int __x = (c); islower(__x) ? (__x - 'a' + 'A') : __x;})
>
> this shouldn't be done with the {}s. I dont know how it should be fixed,
> just that it shouldn't be done. :)
If you object to use of gcc extensions in ctype.h, you could look in
textbooks such as Plauger's "Standard C Library" for more portable
alternatives. But, if you wished gcc to restrict itself to ansi compatible
pre-processing, you could have told it so, e.g. with -ansi. If you did that
and got warning about non-ansi headers, you might have a case for a bug
report, but it ought to be easy enough for you to qualify this #ifdef with
__STRICT_ANSI__ as well as __GNUC__ if you believe that is needed.
Tim
tprince AT computer DOT org
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
- Raw text -