diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1997-03-17 17:08:27 -0500 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1997-03-17 17:08:27 -0500 |
commit | 7c4033ff873eff676305c71bd6f983f74cad53b4 (patch) | |
tree | 7ae572ef4bfdba05eb01d179478fcda3fbb3ae29 /gcc/cppexp.c | |
parent | 1a4a238db926fc794098f6756d5793170b4fac04 (diff) | |
download | gcc-7c4033ff873eff676305c71bd6f983f74cad53b4.zip gcc-7c4033ff873eff676305c71bd6f983f74cad53b4.tar.gz gcc-7c4033ff873eff676305c71bd6f983f74cad53b4.tar.bz2 |
(parse_number): Invalid integer constants are errors if pedantic.
(cpp_lex): Invalid multibyte characters are errors if pedantic.
(cpp_parse_escape): Character constants that do not fit are errors if pedantic.
From-SVN: r13726
Diffstat (limited to 'gcc/cppexp.c')
-rw-r--r-- | gcc/cppexp.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/gcc/cppexp.c b/gcc/cppexp.c index dee3da2..471818a 100644 --- a/gcc/cppexp.c +++ b/gcc/cppexp.c @@ -1,5 +1,5 @@ /* Parse C expressions for CCCP. - Copyright (C) 1987, 1992, 1994, 1995 Free Software Foundation. + Copyright (C) 1987, 1992, 1994, 1995, 1997 Free Software Foundation. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the @@ -238,10 +238,10 @@ parse_number (pfile, start, olen) } if (base <= largest_digit) - cpp_warning (pfile, "integer constant contains digits beyond the radix"); + cpp_pedwarn (pfile, "integer constant contains digits beyond the radix"); if (overflow) - cpp_warning (pfile, "integer constant out of range"); + cpp_pedwarn (pfile, "integer constant out of range"); /* If too big to be signed, consider it unsigned. */ if ((long) n < 0 && ! op.unsignedp) @@ -429,7 +429,7 @@ cpp_lex (pfile) if (mbtowc (& wc, token_buffer, num_chars) == num_chars) result = wc; else - cpp_warning (pfile,"Ignoring invalid multibyte character"); + cpp_pedwarn (pfile,"Ignoring invalid multibyte character"); } #endif op.value = result; @@ -542,7 +542,7 @@ cpp_parse_escape (pfile, string_ptr) if ((i & ~((1 << MAX_CHAR_TYPE_SIZE) - 1)) != 0) { i &= (1 << MAX_CHAR_TYPE_SIZE) - 1; - cpp_warning (pfile, + cpp_pedwarn (pfile, "octal character constant does not fit in a byte"); } return i; @@ -573,7 +573,7 @@ cpp_parse_escape (pfile, string_ptr) if (overflow | (i & ~((1 << BITS_PER_UNIT) - 1))) { i &= (1 << BITS_PER_UNIT) - 1; - cpp_warning (pfile, + cpp_pedwarn (pfile, "hex character constant does not fit in a byte"); } return i; |