diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-09-11 13:20:59 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2020-09-11 13:20:59 (GMT) |
commit | aa4c91c8385dab2f9ad53cdf6b7f6d855553679a (patch) | |
tree | caadb0616e1d66c7e41eccbedef8e5efb140bf36 /generic/tclInt.h | |
parent | 2061afedcc31ca00e6ff09dda489ca101e736339 (diff) | |
parent | 524b1d9fb207987cf66ca92d5198e30e27e0931e (diff) | |
download | tcl-aa4c91c8385dab2f9ad53cdf6b7f6d855553679a.zip tcl-aa4c91c8385dab2f9ad53cdf6b7f6d855553679a.tar.gz tcl-aa4c91c8385dab2f9ad53cdf6b7f6d855553679a.tar.bz2 |
Merge 8.7
Diffstat (limited to 'generic/tclInt.h')
-rw-r--r-- | generic/tclInt.h | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/generic/tclInt.h b/generic/tclInt.h index 7ca9a8c..fba5ecd 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -909,6 +909,12 @@ typedef struct VarInHash { *---------------------------------------------------------------- */ +#if defined(__GNUC__) && (__GNUC__ > 2) +# define TCLFLEXARRAY 0 +#else +# define TCLFLEXARRAY 1 +#endif + /* * Forward declaration to prevent an error when the forward reference to * Command is encountered in the Proc and ImportRef types declared below. @@ -952,7 +958,7 @@ typedef struct CompiledLocal { * is marked by a unique tag during * compilation, and that same tag is used to * find the variable at runtime. */ - char name[1]; /* Name of the local variable starts here. If + char name[TCLFLEXARRAY]; /* Name of the local variable starts here. If * the name is NULL, this will just be '\0'. * The actual size of this field will be large * enough to hold the name. MUST BE THE LAST @@ -1290,7 +1296,7 @@ typedef struct CFWordBC { typedef struct ContLineLoc { int num; /* Number of entries in loc, not counting the * final -1 marker entry. */ - int loc[1]; /* Table of locations, as character offsets. + int loc[TCLFLEXARRAY];/* Table of locations, as character offsets. * The table is allocated as part of the * structure, extending behind the nominal end * of the structure. An entry containing the |