OSDN Git Service

* include/cpplib.h (struct cpp_options): Add new boolean flag
authorsimonb <simonb@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 18 Sep 2008 15:39:08 +0000 (15:39 +0000)
committersimonb <simonb@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 18 Sep 2008 15:39:08 +0000 (15:39 +0000)
commit2ad0b097c1c8904b22684e42942913dd6fbf6308
treee6725c527874d936bd2e164a6a7f885ebaffaf47
parent9a7beb5fca4286c28b28d14fae2fa9584a2bf07b
* include/cpplib.h (struct cpp_options): Add new boolean flag
warn_builtin_macro_redefined.
* init.c (cpp_create_reader): Initialize warn_builtin_macro_redefined.
* (struct builtin_operator): Split out from previous struct builtin,
enhance extra const correctness.
* (struct builtin_macro): Split out from previous struct builtin, add
new always_warn_if_redefined flag, enhance const correctness.
* (mark_named_operators): Use struct builtin_operator.
* (cpp_init_special_builtins): Use struct builtin_macro, add NODE_WARN
to builtins selectively.
* macro.c (warn_of_redefinition): Return false if a builtin macro
is not flagged with NODE_WARN.

* c-opts.c (c_common_handle_option): Add handling for
-Wbuiltin-macro-redefined command line option.
* c.opt: Added builtin-macro-redefined option.
* doc/invoke.texi (Warning Options): Add -Wbuiltin-macro-redefined
documentation.

* gcc.dg/builtin-redefine.c: New.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@140461 138bc75d-0d04-0410-961f-82ee72b054a4
gcc/ChangeLog
gcc/c-opts.c
gcc/c.opt
gcc/doc/invoke.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/builtin-redefine.c [new file with mode: 0644]
libcpp/ChangeLog
libcpp/include/cpplib.h
libcpp/init.c
libcpp/macro.c