(check_format_info): Warn about `L' if -pedantic.
authorRichard Kenner <kenner@gcc.gnu.org>
Sun, 18 Feb 1996 18:29:45 +0000 (13:29 -0500)
committerRichard Kenner <kenner@gcc.gnu.org>
Sun, 18 Feb 1996 18:29:45 +0000 (13:29 -0500)
From-SVN: r11291

gcc/c-common.c

index b181a1c76b34fb431b771a5f67b9ee332bb2eee4..492aa4b08f2163a2cbd61304447f5937d7387b05 100644 (file)
@@ -1083,11 +1083,19 @@ check_format_info (info, params)
        }
       if (*format_chars == 'h' || *format_chars == 'l' || *format_chars == 'q' ||
          *format_chars == 'L')
-       length_char = *format_chars++;
+       {
+         length_char = *format_chars++;
+         if (pedantic)
+           pedwarn ("ANSI C does not support the `q' length modifier");
+       }
       else
        length_char = 0;
       if (length_char == 'l' && *format_chars == 'l')
-       length_char = 'q', format_chars++;
+       {
+         length_char = 'q', format_chars++;
+         if (pedantic)
+           pedwarn ("ANSI C does not support the `ll' length modifier");
+       }
       aflag = 0;
       if (*format_chars == 'a')
        {