aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppexp.c
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>2000-08-10 15:21:18 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>2000-08-10 15:21:18 +0000
commit7da92c086fa7008497a8f959418c7ce05e048d24 (patch)
tree30a07535a16520798c29038412313aa0bf2aecde /gcc/cppexp.c
parentb498d041faed872eb206182e619ebcc22327a2c9 (diff)
downloadgcc-7da92c086fa7008497a8f959418c7ce05e048d24.zip
gcc-7da92c086fa7008497a8f959418c7ce05e048d24.tar.gz
gcc-7da92c086fa7008497a8f959418c7ce05e048d24.tar.bz2
c-lex.c (parse_float, yylex): For -Wtraditional, issue a warning about non-traditional numeric constant suffixes.
* c-lex.c (parse_float, yylex): For -Wtraditional, issue a warning about non-traditional numeric constant suffixes. * cppexp.c (parse_number): Likewise. * invoke.texi: (-Wtraditional): Document new behavior. From-SVN: r35607
Diffstat (limited to 'gcc/cppexp.c')
-rw-r--r--gcc/cppexp.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cppexp.c b/gcc/cppexp.c
index 18f494f..9631526 100644
--- a/gcc/cppexp.c
+++ b/gcc/cppexp.c
@@ -218,6 +218,8 @@ parse_number (pfile, tok)
goto invalid_suffix;
op.unsignedp = sufftab[i].u;
+ if (CPP_WTRADITIONAL (pfile) && sufftab[i].u)
+ cpp_warning (pfile, "traditional C rejects the `U' suffix");
if (CPP_OPTION (pfile, c89) && sufftab[i].l == 2)
SYNTAX_ERROR ("too many 'l' suffixes in integer constant");
}