]> git.ipfire.org Git - thirdparty/gcc.git/commit
cpplib.h (struct cpp_options): Add warn_cxx_operator_names field.
authorIan Lance Taylor <iant@google.com>
Fri, 12 Jun 2009 19:43:25 +0000 (19:43 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Fri, 12 Jun 2009 19:43:25 +0000 (19:43 +0000)
commit3d8b2a98ca3c4d46030c839ad89ed7f3800a9fbf
treeb9bfc85db3cdd44094798b79ced86e5d51c66281
parent737142ced7510afcd0144c866d9169ac7cbf3fb6
cpplib.h (struct cpp_options): Add warn_cxx_operator_names field.

libcpp/:
* include/cpplib.h (struct cpp_options): Add
warn_cxx_operator_names field.
(NODE_WARN_OPERATOR): Define.
(struct cpp_hashnode): Increase flags field to 10 bits, decrease
type to 6 bits.
* init.c (mark_named_operators): Add flags parameter.
(cpp_post_options): Pick flags value to pass to
mark_named_operators.
* lex.c (lex_identifier): If NODE_WARN_OPERATOR is set, warn that
identifier is an operator name in C++.
gcc/:
* fold-const.c (fold_unary): Rename local variable and to
and_expr.
* c-opts.c (c_common_handle_option): For -Wc++-compat set
cpp_opts->warn_cxx_operator_names.
gcc/testsuite/:
* gcc.dg/Wcxx-compat-13.c: New testcase.

From-SVN: r148438
gcc/ChangeLog
gcc/c-opts.c
gcc/fold-const.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/Wcxx-compat-13.c [new file with mode: 0644]
libcpp/ChangeLog
libcpp/include/cpplib.h
libcpp/init.c
libcpp/lex.c