diff options
Diffstat (limited to 'gcc/c-lex.c')
-rw-r--r-- | gcc/c-lex.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/c-lex.c b/gcc/c-lex.c index ab71f787228..d4710a81942 100644 --- a/gcc/c-lex.c +++ b/gcc/c-lex.c @@ -1901,7 +1901,11 @@ yylex () type = flag_traditional ? traditional_type : ansi_type; - if (warn_traditional && traditional_type != ansi_type) + /* We assume that constants specified in a non-decimal + base are bit patterns, and that the programmer really + meant what they wrote. */ + if (warn_traditional && base == 10 + && traditional_type != ansi_type) { if (TYPE_PRECISION (traditional_type) != TYPE_PRECISION (ansi_type)) |