diff options
author | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-07-26 16:29:31 +0000 |
---|---|---|
committer | neil <neil@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-07-26 16:29:31 +0000 |
commit | 70145d81a9f319aef1688277a8abb82080b46d26 (patch) | |
tree | 5271a5e987c477ea49c8fa0b44e1dc372faa2147 /gcc/cppmacro.c | |
parent | 5610f3adad7123c25e5470d8f5719dad3ecbd196 (diff) | |
download | ppe42-gcc-70145d81a9f319aef1688277a8abb82080b46d26.tar.gz ppe42-gcc-70145d81a9f319aef1688277a8abb82080b46d26.zip |
* cppmacro.c (_cpp_create_definition): Don't attempt redefinition
warnings on assertions.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@55778 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cppmacro.c')
-rw-r--r-- | gcc/cppmacro.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/cppmacro.c b/gcc/cppmacro.c index c8e2410af61..50cc9bbf4ba 100644 --- a/gcc/cppmacro.c +++ b/gcc/cppmacro.c @@ -1547,7 +1547,7 @@ _cpp_create_definition (pfile, node) if (!ok) return ok; - if (node->type != NT_VOID) + if (node->type == NT_MACRO) { if (CPP_OPTION (pfile, warn_unused_macros)) _cpp_warn_if_unused_macro (pfile, node, NULL); @@ -1562,9 +1562,11 @@ _cpp_create_definition (pfile, node) node->value.macro->line, 0, "this is the location of the previous definition"); } - _cpp_free_definition (node); } + if (node->type != NT_VOID) + _cpp_free_definition (node); + /* Enter definition in hash table. */ node->type = NT_MACRO; node->value.macro = macro; |