diff options
author | tobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-28 21:09:04 +0000 |
---|---|---|
committer | tobi <tobi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-04-28 21:09:04 +0000 |
commit | 9c359eb8fab900283e7576a01078c37a720924a3 (patch) | |
tree | f8b074ab03ba5914254ffbfc53f1c55de03d5e71 /gcc | |
parent | 540003e2a3ad39a4dfce3d180eace580a300dbae (diff) | |
download | gcc-9c359eb8fab900283e7576a01078c37a720924a3.tar.gz |
* gfortran.h (gfc_gsymbol): Make name a const char *.
* symbol.c (gfc_get_gsymbol): Allocate gsymbol name via
gfc_get_string.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@98942 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/fortran/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/fortran/gfortran.h | 2 | ||||
-rw-r--r-- | gcc/fortran/symbol.c | 2 |
3 files changed, 8 insertions, 2 deletions
diff --git a/gcc/fortran/ChangeLog b/gcc/fortran/ChangeLog index d8cd7060e08..8d8e000e15a 100644 --- a/gcc/fortran/ChangeLog +++ b/gcc/fortran/ChangeLog @@ -1,3 +1,9 @@ +2005-04-28 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de> + + * gfortran.h (gfc_gsymbol): Make name a const char *. + * symbol.c (gfc_get_gsymbol): Allocate gsymbol name via + gfc_get_string. + 2005-04-28 Francois-Xavier Coudert <coudert@clipper.ens.fr> PR fortran/20865 diff --git a/gcc/fortran/gfortran.h b/gcc/fortran/gfortran.h index c266d589c0c..24ffcf37293 100644 --- a/gcc/fortran/gfortran.h +++ b/gcc/fortran/gfortran.h @@ -842,7 +842,7 @@ typedef struct gfc_gsymbol { BBT_HEADER(gfc_gsymbol); - char name[GFC_MAX_SYMBOL_LEN+1]; + const char *name; enum { GSYM_UNKNOWN=1, GSYM_PROGRAM, GSYM_FUNCTION, GSYM_SUBROUTINE, GSYM_MODULE, GSYM_COMMON, GSYM_BLOCK_DATA } type; diff --git a/gcc/fortran/symbol.c b/gcc/fortran/symbol.c index 26e3f003442..6906b81cc23 100644 --- a/gcc/fortran/symbol.c +++ b/gcc/fortran/symbol.c @@ -2410,7 +2410,7 @@ gfc_get_gsymbol (const char *name) s = gfc_getmem (sizeof (gfc_gsymbol)); s->type = GSYM_UNKNOWN; - strcpy (s->name, name); + s->name = gfc_get_string (name); gfc_insert_bbt (&gfc_gsym_root, s, gsym_compare); |