From 38dff11b6e099ed99f3cb9930e3b0d3ced258529 Mon Sep 17 00:00:00 2001 From: Sebastian Hack Date: Tue, 24 Jun 2003 12:29:23 +0000 Subject: [PATCH] Please use xmalloc. malloc doesn't work inside GCC [r1397] --- ir/tr/entity.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ir/tr/entity.c b/ir/tr/entity.c index 8bc79552d..1dfef1516 100644 --- a/ir/tr/entity.c +++ b/ir/tr/entity.c @@ -69,7 +69,7 @@ new_entity (type *owner, ident *name, type *type) assert(!id_contains_char(name, ' ') && "entity name should not contain spaces"); - res = (entity *) malloc (sizeof (entity)); + res = (entity *) xmalloc (sizeof (entity)); res->kind = k_entity; assert_legal_owner_of_ent(owner); res->owner = owner; @@ -130,7 +130,7 @@ copy_entity_own (entity *old, type *new_owner) { assert_legal_owner_of_ent(new_owner); if (old->owner == new_owner) return old; - new = (entity *) malloc (sizeof (entity)); + new = (entity *) xmalloc (sizeof (entity)); memcpy (new, old, sizeof (entity)); new->owner = new_owner; /* @@ -162,7 +162,7 @@ copy_entity_name (entity *old, ident *new_name) { entity *new; if (old->name == new_name) return old; - new = (entity *) malloc (sizeof (entity)); + new = (entity *) xmalloc (sizeof (entity)); memcpy (new, old, sizeof (entity)); new->name = new_name; new->ld_name = NULL; -- 2.20.1