diff options
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cpplib.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 21b8fc4..0f0b435 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2000-02-13 Zack Weinberg <zack@wolery.cumb.org> + + * cpplib.c (do_define): Only free the old definition if it + actually had one. + 2000-02-13 Neil Booth <NeilB@earthling.net> * cppfiles.c (read_and_prescan): When emitting deferred diff --git a/gcc/cpplib.c b/gcc/cpplib.c index 9238d33..844b89f 100644 --- a/gcc/cpplib.c +++ b/gcc/cpplib.c @@ -715,8 +715,9 @@ do_define (pfile, keyword) if (hp->type != T_POISON) { /* Replace the old definition. */ + if (hp->type == T_MACRO) + free_definition (hp->value.defn); hp->type = T_MACRO; - free_definition (hp->value.defn); hp->value.defn = mdef.defn; } } |