diff options
author | Neil Booth <neil@daikokuya.co.uk> | 2002-06-20 20:34:19 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2002-06-20 20:34:19 +0000 |
commit | 017acb41cd8cc90aaec65c4e567f7a126c4c4e6d (patch) | |
tree | a0323cce9b4103b2363bc451d6e3a03652a528b1 /gcc/cppexp.c | |
parent | 5ab23d80ecd18fbe314d192bf54584a0cf185413 (diff) | |
download | gcc-017acb41cd8cc90aaec65c4e567f7a126c4c4e6d.zip gcc-017acb41cd8cc90aaec65c4e567f7a126c4c4e6d.tar.gz gcc-017acb41cd8cc90aaec65c4e567f7a126c4c4e6d.tar.bz2 |
cppexp.c (cpp_interpret_integer): Don't force traditional numbers to be unsigned.
* cppexp.c (cpp_interpret_integer): Don't force traditional
numbers to be unsigned.
* cpplib.c (prepare_directive_trad): Set line number for
diagnostics.
* cpptrad.c (scan_out_logical_line): Continue scanning out
at start of buffer.
* gcc.c (trad_capable_cpp): Use cc1 always.
f:
* lang-specs.h: Use cc1 for traditional preprocessing.
testsuite:
* gcc.dg/cpp/assert_trad1.c, gcc.dg/cpp/assert_trad2.c,
gcc.dg/cpp/assert_trad3.c, gcc.dg/cpp/defined_trad.c,
gcc.dg/cpp/hash2.c, gcc.dg/cpp/tr-define.c, gcc.dg/cpp/tr-direct.c,
gcc.dg/cpp/tr-sign.c, gcc.dg/cpp/tr-str.c, gcc.dg/cpp/uchar-2.c:
Remove.
From-SVN: r54856
Diffstat (limited to 'gcc/cppexp.c')
-rw-r--r-- | gcc/cppexp.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/gcc/cppexp.c b/gcc/cppexp.c index 4fc833c..b3a7ce6 100644 --- a/gcc/cppexp.c +++ b/gcc/cppexp.c @@ -375,10 +375,13 @@ cpp_interpret_integer (pfile, token, type) if (overflow) cpp_error (pfile, DL_PEDWARN, "integer constant is too large for its type"); - else if (!result.unsignedp && !num_positive (result, precision)) + /* If too big to be signed, consider it unsigned. Only warn for + decimal numbers. Traditional numbers were always signed (but + we still honour an explicit U suffix). */ + else if (!result.unsignedp + && !CPP_OPTION (pfile, traditional) + && !num_positive (result, precision)) { - /* If too big to be signed, consider it unsigned. Only warn - for decimal numbers. */ if (base == 10) cpp_error (pfile, DL_WARNING, "integer constant is so large that it is unsigned"); |