summaryrefslogtreecommitdiffstats
path: root/gcc/cppmacro.c
diff options
context:
space:
mode:
authorneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2000-08-17 18:01:43 +0000
committerneil <neil@138bc75d-0d04-0410-961f-82ee72b054a4>2000-08-17 18:01:43 +0000
commit11d10d3fd0f053cfd8fdaa3e52994b95af86031a (patch)
tree08a55b2310020143695da9578d6843781f8dda0a /gcc/cppmacro.c
parent466b3f58da0c029a6ba5f32f8c3fe385226f16d6 (diff)
downloadppe42-gcc-11d10d3fd0f053cfd8fdaa3e52994b95af86031a.tar.gz
ppe42-gcc-11d10d3fd0f053cfd8fdaa3e52994b95af86031a.zip
* cppinit.c (cpp_cleanup): Free include dir chains.
* cpplib.c (do_undef): Let _cpp_free_definition make the node void. (do_unassert): Free the assert with _cpp_free_definition. * cppmacro.c (_cpp_free_definition): Free memory allocated for assertions. Make the node a T_VOID node. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35765 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cppmacro.c')
-rw-r--r--gcc/cppmacro.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/gcc/cppmacro.c b/gcc/cppmacro.c
index ade67d70c31..3c9ffb97483 100644
--- a/gcc/cppmacro.c
+++ b/gcc/cppmacro.c
@@ -404,6 +404,18 @@ _cpp_free_definition (h)
{
if (h->type == T_MACRO)
free ((PTR) h->value.expansion);
+ else if (h->type == T_ASSERTION)
+ {
+ struct answer *temp, *next;
+
+ for (temp = h->value.answers; temp; temp = next)
+ {
+ next = temp->next;
+ FREE_ANSWER (temp);
+ }
+ }
+
+ h->type = T_VOID;
h->value.expansion = NULL;
}
OpenPOWER on IntegriCloud