diff options
author | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-06-23 06:06:29 +0000 |
---|---|---|
committer | bstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4> | 2008-06-23 06:06:29 +0000 |
commit | 8a096472683581315df6e6747212356b3255087e (patch) | |
tree | dac105eba22e3c3a544b760bd2ca5b1db944f65e /gcc/fortran/primary.c | |
parent | 63217c8a41fa03e943e9859df194ab78cbe8639b (diff) | |
download | gcc-8a096472683581315df6e6747212356b3255087e.tar.gz |
2008-06-23 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk r137030
* gcc/melt/warm-basilys.bysl: some primitives got explicit casts.
* gcc/basilys.h: added casts to avoid implicit conversion from void*
disallowed with C++
* gcc/basilys.c: (delete_special, forwarded, scanning) likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@137031 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/fortran/primary.c')
-rw-r--r-- | gcc/fortran/primary.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/gcc/fortran/primary.c b/gcc/fortran/primary.c index a9b47d8bced..d7236e1be01 100644 --- a/gcc/fortran/primary.c +++ b/gcc/fortran/primary.c @@ -196,7 +196,7 @@ match_integer_constant (gfc_expr **result, int signflag) if (length == -1) return MATCH_NO; - buffer = alloca (length + 1); + buffer = (char *) alloca (length + 1); memset (buffer, '\0', length + 1); gfc_gobble_whitespace (); @@ -276,7 +276,7 @@ match_hollerith_constant (gfc_expr **result) e = gfc_constant_result (BT_HOLLERITH, gfc_default_character_kind, &gfc_current_locus); - e->representation.string = gfc_getmem (num + 1); + e->representation.string = XCNEWVEC (char, num + 1); for (i = 0; i < num; i++) { @@ -411,7 +411,7 @@ match_boz_constant (gfc_expr **result) gfc_current_locus = old_loc; - buffer = alloca (length + 1); + buffer = (char *) alloca (length + 1); memset (buffer, '\0', length + 1); match_digits (0, radix, buffer); @@ -562,7 +562,7 @@ done: gfc_current_locus = old_loc; gfc_gobble_whitespace (); - buffer = alloca (count + 1); + buffer = (char *) alloca (count + 1); memset (buffer, '\0', count + 1); p = buffer; @@ -1975,8 +1975,7 @@ typedef struct gfc_structure_ctor_component } gfc_structure_ctor_component; -#define gfc_get_structure_ctor_component() \ - gfc_getmem(sizeof(gfc_structure_ctor_component)) +#define gfc_get_structure_ctor_component() XCNEW (gfc_structure_ctor_component) static void gfc_free_structure_ctor_component (gfc_structure_ctor_component *comp) @@ -2023,7 +2022,7 @@ gfc_match_structure_constructor (gfc_symbol *sym, gfc_expr **result) comp_tail->next = gfc_get_structure_ctor_component (); comp_tail = comp_tail->next; } - comp_tail->name = gfc_getmem(GFC_MAX_SYMBOL_LEN + 1); + comp_tail->name = XCNEWVEC (char, GFC_MAX_SYMBOL_LEN + 1); comp_tail->val = NULL; comp_tail->where = gfc_current_locus; |