aboutsummaryrefslogtreecommitdiff
path: root/gcc/cpplib.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/cpplib.c')
-rw-r--r--gcc/cpplib.c3
1 files changed, 2 insertions, 1 deletions
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;
}
}