From: Zack Weinberg Date: Mon, 14 Feb 2000 07:57:30 +0000 (+0000) Subject: cpplib.c (do_define): Only free the old definition if it actually had one. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=f9ba428f57a347082e6786362d7ce4aa7681944e;p=gcc.git cpplib.c (do_define): Only free the old definition if it actually had one. * cpplib.c (do_define): Only free the old definition if it actually had one. From-SVN: r31964 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 21b8fc43275..0f0b4350f5b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2000-02-13 Zack Weinberg + + * cpplib.c (do_define): Only free the old definition if it + actually had one. + 2000-02-13 Neil Booth * cppfiles.c (read_and_prescan): When emitting deferred diff --git a/gcc/cpplib.c b/gcc/cpplib.c index 9238d334602..844b89fda65 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; } }