summaryrefslogtreecommitdiff
path: root/gcc/c-pragma.c
diff options
context:
space:
mode:
authorzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2000-01-25 17:13:14 +0000
committerzack <zack@138bc75d-0d04-0410-961f-82ee72b054a4>2000-01-25 17:13:14 +0000
commitf8b540f247106eeca99e2930c085c9bb2e3d93f6 (patch)
treee3f4e1a3212b662d8c287e2abd1a0473dd49789b /gcc/c-pragma.c
parent3afe7663ee6b4d256ced625e408b5a57c4e31809 (diff)
downloadgcc-f8b540f247106eeca99e2930c085c9bb2e3d93f6.tar.gz
* c-common.c, c-decl.c, c-lang.c, c-lex.c, c-parse.in, c-pragma.c,
c-typeck.c, objc/objc-act.c: Remove all references to obstack functions obsoleted by GC, such as push_obstacks_nochange, end_temporary_allocation, savealloc, saveable_tree_cons, etc. and code which existed only to decide whether or not to call them. Remove now-unused NESTED argument from start_function; all callers changed. Do not change behavior based on ggc_p. The use of the ixp_obstack in c-iterate.c and the util_obstack in objc/objc-act.c remain; these are not obsoleted by garbage collection. * c-tree.h: Update prototype for start_function. * c-parse.y, c-parse.c, objc/objc-parse.c, objc/objc-parse.y: Rebuild. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@31611 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-pragma.c')
-rw-r--r--gcc/c-pragma.c26
1 files changed, 4 insertions, 22 deletions
diff --git a/gcc/c-pragma.c b/gcc/c-pragma.c
index 5055b3f23bc..2adfcc70af8 100644
--- a/gcc/c-pragma.c
+++ b/gcc/c-pragma.c
@@ -303,17 +303,8 @@ handle_pragma_token (string, token)
#ifdef HANDLE_PRAGMA_WEAK
case ps_weak:
- name = permalloc (strlen (string) + 1);
- if (name == NULL)
- {
- warning ("Out of memory parsing #pragma weak");
- state = ps_bad;
- }
- else
- {
- strcpy (name, string);
- state = ps_name;
- }
+ name = xstrdup (string);
+ state = ps_name;
break;
case ps_name:
@@ -321,17 +312,8 @@ handle_pragma_token (string, token)
break;
case ps_equals:
- value = permalloc (strlen (string) + 1);
- if (value == NULL)
- {
- warning ("Out of memory parsing #pragma weak");
- state = ps_bad;
- }
- else
- {
- strcpy (value, string);
- state = ps_value;
- }
+ value = xstrdup (string);
+ state = ps_value;
break;
case ps_value: