diff options
Diffstat (limited to 'gcc/c-pragma.c')
-rw-r--r-- | gcc/c-pragma.c | 26 |
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: |