diff options
author | Neil Booth <neil@daikokuya.co.uk> | 2002-07-26 16:29:31 +0000 |
---|---|---|
committer | Neil Booth <neil@gcc.gnu.org> | 2002-07-26 16:29:31 +0000 |
commit | c2734e0563046134ee6164ef790d0f1540526f22 (patch) | |
tree | 5271a5e987c477ea49c8fa0b44e1dc372faa2147 /gcc | |
parent | c372b0fa9321712b05a03d00abe3bc763f4b0e64 (diff) | |
download | gcc-c2734e0563046134ee6164ef790d0f1540526f22.zip gcc-c2734e0563046134ee6164ef790d0f1540526f22.tar.gz gcc-c2734e0563046134ee6164ef790d0f1540526f22.tar.bz2 |
cppmacro.c (_cpp_create_definition): Don't attempt redefinition warnings on assertions.
* cppmacro.c (_cpp_create_definition): Don't attempt redefinition
warnings on assertions.
From-SVN: r55778
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cppmacro.c | 6 |
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 21f149e..2dd43e6 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,10 @@ 2002-07-26 Neil Booth <neil@daikokuya.co.uk> + * cppmacro.c (_cpp_create_definition): Don't attempt redefinition + warnings on assertions. + +2002-07-26 Neil Booth <neil@daikokuya.co.uk> + * c-common.h (RID_AND, RID_AND_EQ, RID_NOT, RID_NOT_EQ, RID_OR, RID_OR_EQ, RID_XOR, RID_XOR_EQ, RID_BITAND, RID_BITOR, RID_COMPL): Remove. diff --git a/gcc/cppmacro.c b/gcc/cppmacro.c index c8e2410..50cc9bb 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; |