aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoseph Myers <jsm28@cam.ac.uk>2000-07-17 02:31:15 -0600
committerJeff Law <law@gcc.gnu.org>2000-07-17 02:31:15 -0600
commitbed10af2a49959bbf96a800f326a2e00650b9413 (patch)
treed239b9eaa16de08cf5a5bb6eaba6696481235d5b
parent0281a06fc8d5bfed1ecbd800712e023a017d5499 (diff)
downloadgcc-bed10af2a49959bbf96a800f326a2e00650b9413.zip
gcc-bed10af2a49959bbf96a800f326a2e00650b9413.tar.gz
gcc-bed10af2a49959bbf96a800f326a2e00650b9413.tar.bz2
c-common.c (check_format_info): Do not make a pedantic objection to the 'L' length modifier if...
* c-common.c (check_format_info): Do not make a pedantic objection to the 'L' length modifier if used with a floating point type character. From-SVN: r35076
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/c-common.c9
2 files changed, 12 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index eb2e7b1..ec19678 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,5 +1,9 @@
2000-07-17 Joseph S. Myers <jsm28@cam.ac.uk>
+ * c-common.c (check_format_info): Do not make a pedantic objection
+ to the 'L' length modifier if used with a floating point type
+ character.
+
* c-lex.c (yylex): Don't pedwarn for hexadecimal floating point
constants in C99 mode.
diff --git a/gcc/c-common.c b/gcc/c-common.c
index f72ec47..8a8103b 100644
--- a/gcc/c-common.c
+++ b/gcc/c-common.c
@@ -1780,7 +1780,7 @@ check_format_info (info, params)
else if (*format_chars == 'q' || *format_chars == 'L')
{
length_char = *format_chars++;
- if (pedantic)
+ if (length_char == 'q' && pedantic)
warning ("ANSI C does not support the `%c' length modifier",
length_char);
}
@@ -1936,6 +1936,13 @@ check_format_info (info, params)
if (wanted_type == 0)
warning ("use of `%c' length character with `%c' type character",
length_char, format_char);
+ else if (length_char == 'L' && pedantic
+ && !(format_char == 'a' || format_char == 'A'
+ || format_char == 'e' || format_char == 'E'
+ || format_char == 'f' || format_char == 'F'
+ || format_char == 'g' || format_char == 'G'))
+ warning ("ANSI C does not support the `L' length modifier with the `%c' type character",
+ format_char);
/* Finally. . .check type of argument against desired type! */
if (info->first_arg_num == 0)