diff options
author | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-04-02 22:50:55 +0000 |
---|---|---|
committer | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-04-02 22:50:55 +0000 |
commit | b93c7be0687bc071a650168fc660f5a71cbcd99d (patch) | |
tree | b00fb305180d6ad00464b0f8d26982c399a9faa0 /gcc/cppinit.c | |
parent | 19a641b96ce165ae96683095b39c6518f357dd4d (diff) | |
download | gcc-b93c7be0687bc071a650168fc660f5a71cbcd99d.tar.gz |
* cppinit.c (cpp_start_read): Turn off -Wtraditional if
processing C++.
* cpplib.c (_cpp_handle_directive): Improve warnings for
traditional C and indented directives.
* enquire.c, gsyslimits.h, limity.h, config/convex/fixinc.convex,
fixinc/fixinc.irix, fixinc/fixinc.sco, fixinc/fixinc.wrap,
fixinc/inclhack.def: Indent the # of #include_next one space.
* cp/rtti.c: Un-indent #if and #endif.
* cppexp.c (_cpp_parse_expr): If lex returns '#', it's a
syntax error, but an error has already been printed.
* cpplex.c (_cpp_parse_assertion): Give a more specific error
message when called with nothing remaining on the line.
(_cpp_lex_token): If _cpp_parse_assertion fails, return an
OTHER token, not an ASSERTION.
* cpplib.c (do_assert): When we create a 'base' node, clear
its aschain pointer.
* gcc.c-torture/compile/981211-1.c: Move to...
* gcc.dg/cpp-as1.c: ...here.
* gcc.dg/cpp-as2.c: New file.
* gcc.dg/cpp-tradwarn1.c: Change warning regexps to match the
compiler.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@32870 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cppinit.c')
-rw-r--r-- | gcc/cppinit.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/cppinit.c b/gcc/cppinit.c index 93298efeec9..62da1f34238 100644 --- a/gcc/cppinit.c +++ b/gcc/cppinit.c @@ -852,6 +852,10 @@ cpp_start_read (pfile, fname) CPP_OPTION (pfile, trigraphs) = 0; } + /* -Wtraditional is not useful in C++ mode. */ + if (CPP_OPTION (pfile, cplusplus)) + CPP_OPTION (pfile, warn_traditional) = 0; + /* Set this if it hasn't been set already. */ if (user_label_prefix == NULL) user_label_prefix = USER_LABEL_PREFIX; |