macro.c (warn_of_redefinition): Suppress warnings for builtins that lack the NODE_WARN flag...
libcpp/ChangeLog: 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org> * macro.c (warn_of_redefinition): Suppress warnings for builtins that lack the NODE_WARN flag, unless Wbuiltin-macro-redefined. (_cpp_create_definition): Use Wbuiltin-macro-redefined for builtins that lack the NODE_WARN flag. * directives.c (do_undef): Likewise. * init.c (cpp_init_special_builtins): Do not change flags depending on Wbuiltin-macro-redefined. gcc/c-family/ChangeLog: 2014-08-29 Manuel López-Ibáñez <manu@gcc.gnu.org> * c.opt (Wbuiltin-macro-redefined): Use CPP, Var and Init. * c-opts.c (c_common_handle_option): Do not handle here. From-SVN: r214730
This commit is contained in:
parent
ef0981b8ae
commit
b753b37bd6
7 changed files with 34 additions and 20 deletions
|
@ -610,6 +610,11 @@ do_undef (cpp_reader *pfile)
|
|||
if (node->flags & NODE_WARN)
|
||||
cpp_error (pfile, CPP_DL_WARNING,
|
||||
"undefining \"%s\"", NODE_NAME (node));
|
||||
else if ((node->flags & NODE_BUILTIN)
|
||||
&& CPP_OPTION (pfile, warn_builtin_macro_redefined))
|
||||
cpp_warning_with_line (pfile, CPP_W_BUILTIN_MACRO_REDEFINED,
|
||||
pfile->directive_line, 0,
|
||||
"undefining \"%s\"", NODE_NAME (node));
|
||||
|
||||
if (CPP_OPTION (pfile, warn_unused_macros))
|
||||
_cpp_warn_if_unused_macro (pfile, node, NULL);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue