aboutsummaryrefslogtreecommitdiff
path: root/gcc/cppinit.c
diff options
context:
space:
mode:
authorNeil Booth <neil@daikokuya.demon.co.uk>2002-05-29 17:15:42 +0000
committerNeil Booth <neil@gcc.gnu.org>2002-05-29 17:15:42 +0000
commitcd7ab83f2d607e6be282ff65408d4efd5d1b35f1 (patch)
treecb54dc5c6bb9ba60a0d20a46d9816c704bcb8afa /gcc/cppinit.c
parent61a8515c94ea4a9524e708d7a6e2a172d7cbd48e (diff)
downloadgcc-cd7ab83f2d607e6be282ff65408d4efd5d1b35f1.zip
gcc-cd7ab83f2d607e6be282ff65408d4efd5d1b35f1.tar.gz
gcc-cd7ab83f2d607e6be282ff65408d4efd5d1b35f1.tar.bz2
cppexp.c (cpp_num): Move to cpplib.h.
2002-05-29 Neil Booth <neil@daikokuya.demon.co.uk> Zack Weinberg <zack@codesourcery.com> * cppexp.c (cpp_num): Move to cpplib.h. (CPP_ERROR): Remove. (interpret_float_suffix, interpret_int_suffix): New. (struct suffix, vsuf_1, vsuf_2, vsuf_3): Remove. (cpp_classify_number, cpp_interpret_integer): New. (interpret_number): Remove. (eval_token): Update to use new routines. * cpphash.h (cpp_num_part): Move to cpplib.h. * cppinit.c (cpp_post_options): Set warn_long_long. * cpplib.h (struct cpp_options): Add warn_long_long. (cpp_num, cpp_num_part, CPP_N_CATEGORY, CPP_N_INVALID, CPP_N_INTEGER, CPP_N_FLOATING, CPP_N_WIDTH, CPP_N_SMALL, CPP_N_MEDIUM, CPP_N_LARGE, CPP_N_RADIX, CPP_N_DEC, CPP_N_HEX, CPP_N_OCTAL, CPP_N_UNSIGNED, CPP_N_IMAGINARY, cpp_classify_number, cpp_interpret_integer): New. testsuite: * gcc.dg/cpp/c++98-pedantic.c, gcc.dg/cpp/c89-pedantic.c, gcc.dg/cpp/c94-pedantic.c, gcc.dg/cpp/gnuc89-pedantic.c, gcc.dg/cpp/if-1.c: Update for modified diagnostics. Co-Authored-By: Zack Weinberg <zack@codesourcery.com> From-SVN: r54007
Diffstat (limited to 'gcc/cppinit.c')
-rw-r--r--gcc/cppinit.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cppinit.c b/gcc/cppinit.c
index 86566e5..41842cb 100644
--- a/gcc/cppinit.c
+++ b/gcc/cppinit.c
@@ -1774,6 +1774,9 @@ cpp_post_options (pfile)
if (CPP_OPTION (pfile, cplusplus))
CPP_OPTION (pfile, warn_traditional) = 0;
+ CPP_OPTION (pfile, warn_long_long) = (CPP_OPTION (pfile, pedantic)
+ && !CPP_OPTION (pfile, c99));
+
/* Permanently disable macro expansion if we are rescanning
preprocessed text. Read preprocesed source in ISO mode. */
if (CPP_OPTION (pfile, preprocessed))