diff options
Diffstat (limited to 'libcpp/directives.c')
-rw-r--r-- | libcpp/directives.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libcpp/directives.c b/libcpp/directives.c index 3486a48..631557d 100644 --- a/libcpp/directives.c +++ b/libcpp/directives.c @@ -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); |