c-typeck.c (c_expand_start_case): Don't warn for long switch in system headers.
authorRichard Henderson <rth@cygnus.com>
Sun, 19 Dec 1999 04:31:06 +0000 (20:31 -0800)
committerRichard Henderson <rth@gcc.gnu.org>
Sun, 19 Dec 1999 04:31:06 +0000 (20:31 -0800)
        * c-typeck.c (c_expand_start_case): Don't warn for long switch
        in system headers.

From-SVN: r31020

gcc/ChangeLog
gcc/c-typeck.c

index 53ea5490a518745832350cab1a52bd8746484918..ddd592244667c6d4ffd1bb203f7efe563ba2d9f4 100644 (file)
@@ -1,3 +1,8 @@
+Sat Dec 18 20:30:15 1999  Richard Henderson  <rth@cygnus.com>
+
+       * c-typeck.c (c_expand_start_case): Don't warn for long switch
+       in system headers.
+
 Sat Dec 18 16:28:43 1999  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
 
        * alias.c: Minor reformatting.
index d6e0b8f9f072152b2c51aebc8ead2bdefafdcf03..8b6a0d69c2aa26cb00d76b5c6c6cb5ef1958dca8 100644 (file)
@@ -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");