This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


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

-Wtraditional tweek


This warning is triggered by glibc's <bits/string2.h>, which
makes for a lot of useless noise.


r~


        * c-typeck.c (c_expand_start_case): Don't warn for long switch
        in system headers.

Index: gcc/c-typeck.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/c-typeck.c,v
retrieving revision 1.43
diff -u -p -d -r1.43 c-typeck.c
--- c-typeck.c	1999/11/25 16:58:31	1.43
+++ c-typeck.c	1999/12/19 04:28:14
@@ -6714,6 +6714,7 @@ c_expand_start_case (exp)
       type = TYPE_MAIN_VARIANT (TREE_TYPE (exp));
 
       if (warn_traditional
+	  && ! in_system_header
 	  && (type == long_integer_type_node
 	      || type == long_unsigned_type_node))
 	pedwarn ("`long' switch expression not converted to `int' in ANSI C");


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