Re: libc6-dev and "-pedantic -O" warnings
David Starner <dstarner98@aasaa.ofe.org> writes:
> IMHO, it really doesn't matter that the libc headers have GNU C
> specific features, as they were only designed to be used with it. It might
> help to have it not warn, though.
Agreed. I just discovered the way to do this: __extension__
Other header files use it before braced-groups within expressions, so
here is a patch for ctype.h to suppress the warning.
------------------------------ 8< ------------------------------
--- /usr/include/ctype.h.orig Mon May 31 06:18:37 1999
+++ /usr/include/ctype.h Sun Jun 6 17:18:23 1999
@@ -165,6 +165,7 @@
#if __GNUC__ >= 2 && defined __OPTIMIZE__ && !defined __cplusplus
# define __tobody(c, f, a) \
+ __extension__ \
({ int __res; \
if (sizeof (c) > 1) \
{ \
------------------------------ >8 ------------------------------
[I you really want to patch this, use -l since I messed with the
whitespace to make it fit.]
I will submit a bug against libc6-dev tonight.
Kirk
Reply to: