aboutsummaryrefslogtreecommitdiff
path: root/gcc/c-common.c
diff options
context:
space:
mode:
authorRichard Kenner <kenner@gcc.gnu.org>1996-02-18 13:29:45 -0500
committerRichard Kenner <kenner@gcc.gnu.org>1996-02-18 13:29:45 -0500
commit15cf7c831ed77da1369ba0b27480fc3a73c2b396 (patch)
treeb1522946ca008da7541a3404a33dcb98bfca11a2 /gcc/c-common.c
parent7e842ef8c598036fa32d6d87fa350c04f0b037e3 (diff)
downloadgcc-15cf7c831ed77da1369ba0b27480fc3a73c2b396.zip
gcc-15cf7c831ed77da1369ba0b27480fc3a73c2b396.tar.gz
gcc-15cf7c831ed77da1369ba0b27480fc3a73c2b396.tar.bz2
(check_format_info): Warn about `L' if -pedantic.
From-SVN: r11291
Diffstat (limited to 'gcc/c-common.c')
-rw-r--r--gcc/c-common.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/gcc/c-common.c b/gcc/c-common.c
index b181a1c..492aa4b0 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -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')
{