summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-10-02 16:28:09 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-10-02 16:28:09 (GMT)
commitb7c4b811ec358b518d9a5ceaf204a84a5e5b59a8 (patch)
treee0bc5a6114da04b2bb9a713ea069b83d14620b23 /generic
parentcb6ae544245fea42d68f1f1c0c3ab5fd92babcaf (diff)
downloadtcl-b7c4b811ec358b518d9a5ceaf204a84a5e5b59a8.zip
tcl-b7c4b811ec358b518d9a5ceaf204a84a5e5b59a8.tar.gz
tcl-b7c4b811ec358b518d9a5ceaf204a84a5e5b59a8.tar.bz2
Fix -Wshadow warnings, when compiling with a C++ compiler
Diffstat (limited to 'generic')
-rw-r--r--generic/regcomp.c32
-rw-r--r--generic/tclCmdIL.c4
-rw-r--r--generic/tclCmdMZ.c26
-rw-r--r--generic/tclCompCmdsSZ.c4
-rw-r--r--generic/tclEvent.c4
-rw-r--r--generic/tclFileName.c4
-rw-r--r--generic/tclIOCmd.c10
-rw-r--r--generic/tclIndexObj.c4
-rw-r--r--generic/tclInterp.c12
-rw-r--r--generic/tclLoad.c10
-rw-r--r--generic/tclPkg.c4
-rw-r--r--generic/tclProcess.c4
-rw-r--r--generic/tclTest.c8
-rw-r--r--generic/tclTimer.c2
-rw-r--r--generic/tclTrace.c4
-rw-r--r--generic/tclVar.c8
-rw-r--r--generic/tclZlib.c4
17 files changed, 73 insertions, 71 deletions
diff --git a/generic/regcomp.c b/generic/regcomp.c
index 99dfef1..3be5172 100644
--- a/generic/regcomp.c
+++ b/generic/regcomp.c
@@ -56,7 +56,7 @@ static const chr *scanplain(struct vars *);
static void onechr(struct vars *, pchr, struct state *, struct state *);
static void dovec(struct vars *, struct cvec *, struct state *, struct state *);
static void wordchrs(struct vars *);
-static struct subre *subre(struct vars *, int, int, struct state *, struct state *);
+static struct subre *sub_re(struct vars *, int, int, struct state *, struct state *);
static void freesubre(struct vars *, struct subre *);
static void freesrnode(struct vars *, struct subre *);
static int numst(struct subre *, int);
@@ -663,7 +663,7 @@ parse(
assert(stopper == ')' || stopper == EOS);
- branches = subre(v, '|', LONGER, init, final);
+ branches = sub_re(v, '|', LONGER, init, final);
NOERRN();
branch = branches;
firstbranch = 1;
@@ -673,7 +673,7 @@ parse(
* Need a place to hang the branch.
*/
- branch->right = subre(v, '|', LONGER, init, final);
+ branch->right = sub_re(v, '|', LONGER, init, final);
NOERRN();
branch = branch->right;
}
@@ -744,7 +744,7 @@ parsebranch(
lp = left;
seencontent = 0;
- t = subre(v, '=', 0, left, right); /* op '=' is tentative */
+ t = sub_re(v, '=', 0, left, right); /* op '=' is tentative */
NOERRN();
while (!SEE('|') && !SEE(stopper) && !SEE(EOS)) {
if (seencontent) { /* implicit concat operator */
@@ -977,7 +977,7 @@ parseqatom(
NOERR();
if (cap) {
v->subs[subno] = atom;
- t = subre(v, '(', atom->flags|CAP, lp, rp);
+ t = sub_re(v, '(', atom->flags|CAP, lp, rp);
NOERR();
t->subno = subno;
t->left = atom;
@@ -995,7 +995,7 @@ parseqatom(
INSIST(v->subs[v->nextvalue] != NULL, REG_ESUBREG);
NOERR();
assert(v->nextvalue > 0);
- atom = subre(v, 'b', BACKR, lp, rp);
+ atom = sub_re(v, 'b', BACKR, lp, rp);
NOERR();
subno = v->nextvalue;
atom->subno = subno;
@@ -1110,7 +1110,7 @@ parseqatom(
*/
if (atom == NULL) {
- atom = subre(v, '=', 0, lp, rp);
+ atom = sub_re(v, '=', 0, lp, rp);
NOERR();
}
@@ -1147,7 +1147,7 @@ parseqatom(
* Break remaining subRE into x{...} and what follows.
*/
- t = subre(v, '.', COMBINE(qprefer, atom->flags), lp, rp);
+ t = sub_re(v, '.', COMBINE(qprefer, atom->flags), lp, rp);
NOERR();
t->left = atom;
atomp = &t->left;
@@ -1161,7 +1161,7 @@ parseqatom(
*/
assert(top->op == '=' && top->left == NULL && top->right == NULL);
- top->left = subre(v, '=', top->flags, top->begin, lp);
+ top->left = sub_re(v, '=', top->flags, top->begin, lp);
NOERR();
top->op = '.';
top->right = t;
@@ -1230,9 +1230,9 @@ parseqatom(
assert(m >= 1 && m != DUPINF && n >= 1);
repeat(v, s, atom->begin, m-1, (n == DUPINF) ? n : n-1);
f = COMBINE(qprefer, atom->flags);
- t = subre(v, '.', f, s, atom->end); /* prefix and atom */
+ t = sub_re(v, '.', f, s, atom->end); /* prefix and atom */
NOERR();
- t->left = subre(v, '=', PREF(f), s, atom->begin);
+ t->left = sub_re(v, '=', PREF(f), s, atom->begin);
NOERR();
t->right = atom;
*atomp = t;
@@ -1247,7 +1247,7 @@ parseqatom(
dupnfa(v->nfa, atom->begin, atom->end, s, s2);
repeat(v, s, s2, m, n);
f = COMBINE(qprefer, atom->flags);
- t = subre(v, '*', f, s, s2);
+ t = sub_re(v, '*', f, s, s2);
NOERR();
t->min = (short) m;
t->max = (short) n;
@@ -1265,7 +1265,7 @@ parseqatom(
t->right = parsebranch(v, stopper, type, s2, rp, 1);
} else {
EMPTYARC(s2, rp);
- t->right = subre(v, '=', 0, s2, rp);
+ t->right = sub_re(v, '=', 0, s2, rp);
}
NOERR();
assert(SEE('|') || SEE(stopper) || SEE(EOS));
@@ -1717,12 +1717,12 @@ wordchrs(
}
/*
- - subre - allocate a subre
- ^ static struct subre *subre(struct vars *, int, int, struct state *,
+ - sub_re - allocate a subre
+ ^ static struct subre *sub_re(struct vars *, int, int, struct state *,
^ struct state *);
*/
static struct subre *
-subre(
+sub_re(
struct vars *v,
int op,
int flags,
diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c
index df2decb..e8e69b2 100644
--- a/generic/tclCmdIL.c
+++ b/generic/tclCmdIL.c
@@ -3157,7 +3157,7 @@ Tcl_LsearchObjCmd(
"-real", "-regexp", "-sorted", "-start", "-stride",
"-subindices", NULL
};
- enum options {
+ enum lsearchoptions {
LSEARCH_ALL, LSEARCH_ASCII, LSEARCH_BISECT, LSEARCH_DECREASING,
LSEARCH_DICTIONARY, LSEARCH_EXACT, LSEARCH_GLOB, LSEARCH_INCREASING,
LSEARCH_INDEX, LSEARCH_INLINE, LSEARCH_INTEGER, LSEARCH_NOCASE,
@@ -3205,7 +3205,7 @@ Tcl_LsearchObjCmd(
result = TCL_ERROR;
goto done;
}
- switch ((enum options) index) {
+ switch ((enum lsearchoptions) index) {
case LSEARCH_ALL: /* -all */
allMatches = 1;
break;
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index b321fec..ce8ba13 100644
--- a/generic/tclCmdMZ.c
+++ b/generic/tclCmdMZ.c
@@ -137,7 +137,7 @@ Tcl_RegexpObjCmd(
"-expanded", "-line", "-linestop", "-lineanchor",
"-nocase", "-start", "--", NULL
};
- enum options {
+ enum regexpoptions {
REGEXP_ALL, REGEXP_ABOUT, REGEXP_INDICES, REGEXP_INLINE,
REGEXP_EXPANDED,REGEXP_LINE, REGEXP_LINESTOP,REGEXP_LINEANCHOR,
REGEXP_NOCASE, REGEXP_START, REGEXP_LAST
@@ -162,7 +162,7 @@ Tcl_RegexpObjCmd(
&index) != TCL_OK) {
goto optionError;
}
- switch ((enum options) index) {
+ switch ((enum regexpoptions) index) {
case REGEXP_ALL:
all = 1;
break;
@@ -499,7 +499,7 @@ Tcl_RegsubObjCmd(
"-linestop", "-lineanchor", "-nocase", "-start",
"--", NULL
};
- enum options {
+ enum regsubobjoptions {
REGSUB_ALL, REGSUB_COMMAND, REGSUB_EXPANDED, REGSUB_LINE,
REGSUB_LINESTOP, REGSUB_LINEANCHOR, REGSUB_NOCASE, REGSUB_START,
REGSUB_LAST
@@ -523,7 +523,7 @@ Tcl_RegsubObjCmd(
TCL_EXACT, &index) != TCL_OK) {
goto optionError;
}
- switch ((enum options) index) {
+ switch ((enum regsubobjoptions) index) {
case REGSUB_ALL:
all = 1;
break;
@@ -1536,7 +1536,7 @@ StringIsCmd(
"space", "true", "upper", "wideinteger",
"wordchar", "xdigit", NULL
};
- enum isClasses {
+ enum isClassesEnum {
STR_IS_ALNUM, STR_IS_ALPHA, STR_IS_ASCII, STR_IS_CONTROL,
STR_IS_BOOL, STR_IS_DICT, STR_IS_DIGIT, STR_IS_DOUBLE,
STR_IS_ENTIER, STR_IS_FALSE, STR_IS_GRAPH, STR_IS_INT,
@@ -1547,7 +1547,7 @@ StringIsCmd(
static const char *const isOptions[] = {
"-strict", "-failindex", NULL
};
- enum isOptions {
+ enum isOptionsEnum {
OPT_STRICT, OPT_FAILIDX
};
@@ -1569,7 +1569,7 @@ StringIsCmd(
&idx2) != TCL_OK) {
return TCL_ERROR;
}
- switch ((enum isOptions) idx2) {
+ switch ((enum isOptionsEnum) idx2) {
case OPT_STRICT:
strict = 1;
break;
@@ -1598,7 +1598,7 @@ StringIsCmd(
* When entering here, result == 1 and failat == 0.
*/
- switch ((enum isClasses) index) {
+ switch ((enum isClassesEnum) index) {
case STR_IS_ALNUM:
chcomp = Tcl_UniCharIsAlnum;
break;
@@ -3484,7 +3484,7 @@ TclNRSwitchObjCmd(
"-exact", "-glob", "-indexvar", "-matchvar", "-nocase", "-regexp",
"--", NULL
};
- enum options {
+ enum switchOptionsEnum {
OPT_EXACT, OPT_GLOB, OPT_INDEXV, OPT_MATCHV, OPT_NOCASE, OPT_REGEXP,
OPT_LAST
};
@@ -3505,7 +3505,7 @@ TclNRSwitchObjCmd(
&index) != TCL_OK) {
return TCL_ERROR;
}
- switch ((enum options) index) {
+ switch ((enum switchOptionsEnum) index) {
/*
* General options.
*/
@@ -4171,7 +4171,7 @@ Tcl_TimeRateObjCmd(
static const char *const options[] = {
"-direct", "-overhead", "-calibrate", "--", NULL
};
- enum options {
+ enum timeRateOptionsEnum {
TMRT_EV_DIRECT, TMRT_OVERHEAD, TMRT_CALIBRATE, TMRT_LAST
};
NRE_callback *rootPtr;
@@ -4188,7 +4188,7 @@ Tcl_TimeRateObjCmd(
i++;
break;
}
- switch (index) {
+ switch ((enum timeRateOptionsEnum)index) {
case TMRT_EV_DIRECT:
direct = objv[i];
break;
@@ -4203,6 +4203,8 @@ Tcl_TimeRateObjCmd(
case TMRT_CALIBRATE:
calibrate = objv[i];
break;
+ case TMRT_LAST:
+ break;
}
}
diff --git a/generic/tclCompCmdsSZ.c b/generic/tclCompCmdsSZ.c
index c9e2add..fe661f8 100644
--- a/generic/tclCompCmdsSZ.c
+++ b/generic/tclCompCmdsSZ.c
@@ -511,7 +511,7 @@ TclCompileStringIsCmd(
"true", "upper", "wideinteger", "wordchar",
"xdigit", NULL
};
- enum isClasses {
+ enum isClassesEnum {
STR_IS_ALNUM, STR_IS_ALPHA, STR_IS_ASCII, STR_IS_CONTROL,
STR_IS_BOOL, STR_IS_DICT, STR_IS_DIGIT, STR_IS_DOUBLE, STR_IS_ENTIER,
STR_IS_FALSE, STR_IS_GRAPH, STR_IS_INT, STR_IS_LIST,
@@ -575,7 +575,7 @@ TclCompileStringIsCmd(
CompileWord(envPtr, tokenPtr, interp, parsePtr->numWords-1);
- switch ((enum isClasses) t) {
+ switch ((enum isClassesEnum) t) {
case STR_IS_ALNUM:
strClassType = STR_CLASS_ALNUM;
goto compileStrClass;
diff --git a/generic/tclEvent.c b/generic/tclEvent.c
index a6d2234..85f76e3 100644
--- a/generic/tclEvent.c
+++ b/generic/tclEvent.c
@@ -1502,7 +1502,7 @@ Tcl_UpdateObjCmd(
int optionIndex;
int flags = 0; /* Initialized to avoid compiler warning. */
static const char *const updateOptions[] = {"idletasks", NULL};
- enum updateOptions {OPT_IDLETASKS};
+ enum updateOptionsEnum {OPT_IDLETASKS};
if (objc == 1) {
flags = TCL_ALL_EVENTS|TCL_DONT_WAIT;
@@ -1511,7 +1511,7 @@ Tcl_UpdateObjCmd(
"option", 0, &optionIndex) != TCL_OK) {
return TCL_ERROR;
}
- switch ((enum updateOptions) optionIndex) {
+ switch ((enum updateOptionsEnum) optionIndex) {
case OPT_IDLETASKS:
flags = TCL_WINDOW_EVENTS|TCL_IDLE_EVENTS|TCL_DONT_WAIT;
break;
diff --git a/generic/tclFileName.c b/generic/tclFileName.c
index 6d8b751..4c0125f 100644
--- a/generic/tclFileName.c
+++ b/generic/tclFileName.c
@@ -1237,7 +1237,7 @@ Tcl_GlobObjCmd(
"-directory", "-join", "-nocomplain", "-path", "-tails",
"-types", "--", NULL
};
- enum options {
+ enum globOptionsEnum {
GLOB_DIR, GLOB_JOIN, GLOB_NOCOMPLAIN, GLOB_PATH, GLOB_TAILS,
GLOB_TYPE, GLOB_LAST
};
@@ -1270,7 +1270,7 @@ Tcl_GlobObjCmd(
}
}
- switch (index) {
+ switch ((enum globOptionsEnum) index) {
case GLOB_NOCOMPLAIN: /* -nocomplain */
globFlags |= TCL_GLOBMODE_NO_COMPLAIN;
break;
diff --git a/generic/tclIOCmd.c b/generic/tclIOCmd.c
index 41ee9bd..e28f9de 100644
--- a/generic/tclIOCmd.c
+++ b/generic/tclIOCmd.c
@@ -888,7 +888,7 @@ Tcl_ExecObjCmd(
static const char *const options[] = {
"-ignorestderr", "-keepnewline", "--", NULL
};
- enum options {
+ enum execOptionsEnum {
EXEC_IGNORESTDERR, EXEC_KEEPNEWLINE, EXEC_LAST
};
@@ -1470,7 +1470,7 @@ Tcl_SocketObjCmd(
"-async", "-myaddr", "-myport", "-reuseaddr", "-reuseport", "-server",
NULL
};
- enum socketOptions {
+ enum socketOptionsEnum {
SKT_ASYNC, SKT_MYADDR, SKT_MYPORT, SKT_REUSEADDR, SKT_REUSEPORT,
SKT_SERVER
};
@@ -1495,7 +1495,7 @@ Tcl_SocketObjCmd(
TCL_EXACT, &optionIndex) != TCL_OK) {
return TCL_ERROR;
}
- switch ((enum socketOptions) optionIndex) {
+ switch ((enum socketOptionsEnum) optionIndex) {
case SKT_ASYNC:
if (server == 1) {
Tcl_SetObjResult(interp, Tcl_NewStringObj(
@@ -1806,7 +1806,7 @@ ChanPendingObjCmd(
Tcl_Channel chan;
int index, mode;
static const char *const options[] = {"input", "output", NULL};
- enum options {PENDING_INPUT, PENDING_OUTPUT};
+ enum pendingOptionsEnum {PENDING_INPUT, PENDING_OUTPUT};
if (objc != 3) {
Tcl_WrongNumArgs(interp, 1, objv, "mode channelId");
@@ -1822,7 +1822,7 @@ ChanPendingObjCmd(
return TCL_ERROR;
}
- switch ((enum options) index) {
+ switch ((enum pendingOptionsEnum) index) {
case PENDING_INPUT:
if (!(mode & TCL_READABLE)) {
Tcl_SetObjResult(interp, Tcl_NewWideIntObj(-1));
diff --git a/generic/tclIndexObj.c b/generic/tclIndexObj.c
index 63a9466..6ae2075 100644
--- a/generic/tclIndexObj.c
+++ b/generic/tclIndexObj.c
@@ -553,7 +553,7 @@ PrefixMatchObjCmd(
static const char *const matchOptions[] = {
"-error", "-exact", "-message", NULL
};
- enum matchOptions {
+ enum matchOptionsEnum {
PRFMATCH_ERROR, PRFMATCH_EXACT, PRFMATCH_MESSAGE
};
@@ -567,7 +567,7 @@ PrefixMatchObjCmd(
&index) != TCL_OK) {
return TCL_ERROR;
}
- switch ((enum matchOptions) index) {
+ switch ((enum matchOptionsEnum) index) {
case PRFMATCH_EXACT:
flags |= TCL_EXACT;
break;
diff --git a/generic/tclInterp.c b/generic/tclInterp.c
index 434d9f4..f724175 100644
--- a/generic/tclInterp.c
+++ b/generic/tclInterp.c
@@ -635,7 +635,7 @@ NRInterpCmd(
"invokehidden", "limit", "marktrusted", "recursionlimit",
"share", "target", "transfer", NULL
};
- enum option {
+ enum interpOptionEnum {
OPT_ALIAS, OPT_ALIASES, OPT_BGERROR, OPT_CANCEL,
OPT_CHILDREN, OPT_CREATE, OPT_DEBUG, OPT_DELETE,
OPT_EVAL, OPT_EXISTS, OPT_EXPOSE, OPT_HIDE,
@@ -655,7 +655,7 @@ NRInterpCmd(
"option", 0, &index);
return TCL_ERROR;
}
- switch ((enum option)index) {
+ switch ((enum interpOptionEnum)index) {
case OPT_ALIAS: {
Tcl_Interp *parentInterp;
@@ -708,7 +708,7 @@ NRInterpCmd(
static const char *const cancelOptions[] = {
"-unwind", "--", NULL
};
- enum option {
+ enum optionCancelEnum {
OPT_UNWIND, OPT_LAST
};
@@ -723,7 +723,7 @@ NRInterpCmd(
return TCL_ERROR;
}
- switch ((enum option) index) {
+ switch ((enum optionCancelEnum) index) {
case OPT_UNWIND:
/*
* The evaluation stack in the target interp is to be unwound.
@@ -2562,7 +2562,7 @@ NRChildCmd(
"issafe", "invokehidden", "limit", "marktrusted",
"recursionlimit", NULL
};
- enum options {
+ enum childCmdOptionsEnum {
OPT_ALIAS, OPT_ALIASES, OPT_BGERROR, OPT_DEBUG,
OPT_EVAL, OPT_EXPOSE, OPT_HIDE, OPT_HIDDEN,
OPT_ISSAFE, OPT_INVOKEHIDDEN, OPT_LIMIT, OPT_MARKTRUSTED,
@@ -2582,7 +2582,7 @@ NRChildCmd(
return TCL_ERROR;
}
- switch ((enum options) index) {
+ switch ((enum childCmdOptionsEnum) index) {
case OPT_ALIAS:
if (objc > 2) {
if (objc == 3) {
diff --git a/generic/tclLoad.c b/generic/tclLoad.c
index 1ca1950..c143d0a 100644
--- a/generic/tclLoad.c
+++ b/generic/tclLoad.c
@@ -137,7 +137,7 @@ Tcl_LoadObjCmd(
static const char *const options[] = {
"-global", "-lazy", "--", NULL
};
- enum options {
+ enum loadOptionsEnum {
LOAD_GLOBAL, LOAD_LAZY, LOAD_LAST
};
@@ -150,9 +150,9 @@ Tcl_LoadObjCmd(
return TCL_ERROR;
}
++objv; --objc;
- if (LOAD_GLOBAL == (enum options) index) {
+ if (LOAD_GLOBAL == (enum loadOptionsEnum) index) {
flags |= TCL_LOAD_GLOBAL;
- } else if (LOAD_LAZY == (enum options) index) {
+ } else if (LOAD_LAZY == (enum loadOptionsEnum) index) {
flags |= TCL_LOAD_LAZY;
} else {
break;
@@ -559,7 +559,7 @@ Tcl_UnloadObjCmd(
static const char *const options[] = {
"-nocomplain", "-keeplibrary", "--", NULL
};
- enum options {
+ enum unloadOptionsEnum {
UNLOAD_NOCOMPLAIN, UNLOAD_KEEPLIB, UNLOAD_LAST
};
@@ -584,7 +584,7 @@ Tcl_UnloadObjCmd(
break;
}
}
- switch (index) {
+ switch ((enum unloadOptionsEnum)index) {
case UNLOAD_NOCOMPLAIN: /* -nocomplain */
complain = 0;
break;
diff --git a/generic/tclPkg.c b/generic/tclPkg.c
index cda74b1..89fb0c4 100644
--- a/generic/tclPkg.c
+++ b/generic/tclPkg.c
@@ -1073,7 +1073,7 @@ TclNRPackageObjCmd(
"present", "provide", "require", "unknown", "vcompare",
"versions", "vsatisfies", NULL
};
- enum pkgOptions {
+ enum pkgOptionsEnum {
PKG_FILES, PKG_FORGET, PKG_IFNEEDED, PKG_NAMES, PKG_PREFER,
PKG_PRESENT, PKG_PROVIDE, PKG_REQUIRE, PKG_UNKNOWN, PKG_VCOMPARE,
PKG_VERSIONS, PKG_VSATISFIES
@@ -1099,7 +1099,7 @@ TclNRPackageObjCmd(
&optionIndex) != TCL_OK) {
return TCL_ERROR;
}
- switch ((enum pkgOptions) optionIndex) {
+ switch ((enum pkgOptionsEnum) optionIndex) {
case PKG_FILES: {
PkgFiles *pkgFiles;
diff --git a/generic/tclProcess.c b/generic/tclProcess.c
index d4cf717..7bd5e1a 100644
--- a/generic/tclProcess.c
+++ b/generic/tclProcess.c
@@ -472,7 +472,7 @@ ProcessStatusObjCmd(
static const char *const switches[] = {
"-wait", "--", NULL
};
- enum switches {
+ enum switchesEnum {
STATUS_WAIT, STATUS_LAST
};
@@ -485,7 +485,7 @@ ProcessStatusObjCmd(
return TCL_ERROR;
}
++objv; --objc;
- if (STATUS_WAIT == (enum switches) index) {
+ if (STATUS_WAIT == (enum switchesEnum) index) {
options = 0;
} else {
break;
diff --git a/generic/tclTest.c b/generic/tclTest.c
index 1523666..a8ca463 100644
--- a/generic/tclTest.c
+++ b/generic/tclTest.c
@@ -3206,7 +3206,7 @@ TestlinkarrayCmd(
static const char *LinkOption[] = {
"update", "remove", "create", NULL
};
- enum LinkOption { LINK_UPDATE, LINK_REMOVE, LINK_CREATE };
+ enum LinkOptionEnum { LINK_UPDATE, LINK_REMOVE, LINK_CREATE };
static const char *LinkType[] = {
"char", "uchar", "short", "ushort", "int", "uint", "long", "ulong",
"wide", "uwide", "float", "double", "string", "char*", "binary", NULL
@@ -3231,7 +3231,7 @@ TestlinkarrayCmd(
&optionIndex) != TCL_OK) {
return TCL_ERROR;
}
- switch ((enum LinkOption) optionIndex) {
+ switch ((enum LinkOptionEnum) optionIndex) {
case LINK_UPDATE:
for (i=2; i<objc; i++) {
Tcl_UpdateLinkedVar(interp, Tcl_GetString(objv[i]));
@@ -3797,7 +3797,7 @@ TestregexpObjCmd(
"-xflags",
"--", NULL
};
- enum options {
+ enum optionsEnum {
REGEXP_INDICES, REGEXP_NOCASE, REGEXP_ABOUT, REGEXP_EXPANDED,
REGEXP_MULTI, REGEXP_NOCROSS, REGEXP_NEWL,
REGEXP_XFLAGS,
@@ -3822,7 +3822,7 @@ TestregexpObjCmd(
&index) != TCL_OK) {
return TCL_ERROR;
}
- switch ((enum options) index) {
+ switch ((enum optionsEnum) index) {
case REGEXP_INDICES:
indices = 1;
break;
diff --git a/generic/tclTimer.c b/generic/tclTimer.c
index e7fe14b..6b94cbb 100644
--- a/generic/tclTimer.c
+++ b/generic/tclTimer.c
@@ -792,7 +792,7 @@ Tcl_AfterObjCmd(
static const char *const afterSubCmds[] = {
"cancel", "idle", "info", NULL
};
- enum afterSubCmds {AFTER_CANCEL, AFTER_IDLE, AFTER_INFO};
+ enum afterSubCmdsEnum {AFTER_CANCEL, AFTER_IDLE, AFTER_INFO};
ThreadSpecificData *tsdPtr = InitTimer();
if (objc < 2) {
diff --git a/generic/tclTrace.c b/generic/tclTrace.c
index cf9da4f..d189581 100644
--- a/generic/tclTrace.c
+++ b/generic/tclTrace.c
@@ -202,7 +202,7 @@ Tcl_TraceObjCmd(
NULL
};
/* 'OLD' options are pre-Tcl-8.4 style */
- enum traceOptions {
+ enum traceOptionsEnum {
TRACE_ADD, TRACE_INFO, TRACE_REMOVE,
#ifndef TCL_REMOVE_OBSOLETE_TRACES
TRACE_OLD_VARIABLE, TRACE_OLD_VDELETE, TRACE_OLD_VINFO
@@ -218,7 +218,7 @@ Tcl_TraceObjCmd(
&optionIndex) != TCL_OK) {
return TCL_ERROR;
}
- switch ((enum traceOptions) optionIndex) {
+ switch ((enum traceOptionsEnum) optionIndex) {
case TRACE_ADD:
case TRACE_REMOVE: {
/*
diff --git a/generic/tclVar.c b/generic/tclVar.c
index a48cf96..0f0bc25 100644
--- a/generic/tclVar.c
+++ b/generic/tclVar.c
@@ -3917,7 +3917,7 @@ ArrayNamesCmd(
static const char *const options[] = {
"-exact", "-glob", "-regexp", NULL
};
- enum options { OPT_EXACT, OPT_GLOB, OPT_REGEXP };
+ enum arrayNamesOptionsEnum { OPT_EXACT, OPT_GLOB, OPT_REGEXP };
Var *varPtr, *varPtr2;
Tcl_Obj *nameObj, *resultObj, *patternObj;
Tcl_HashSearch search;
@@ -3985,7 +3985,7 @@ ArrayNamesCmd(
const char *name = TclGetString(nameObj);
int matched = 0;
- switch ((enum options) mode) {
+ switch ((enum arrayNamesOptionsEnum) mode) {
case OPT_EXACT:
Tcl_Panic("exact matching shouldn't get here");
case OPT_GLOB:
@@ -6635,7 +6635,7 @@ ArrayDefaultCmd(
static const char *const options[] = {
"get", "set", "exists", "unset", NULL
};
- enum options { OPT_GET, OPT_SET, OPT_EXISTS, OPT_UNSET };
+ enum arrayDefaultOptionsEnum { OPT_GET, OPT_SET, OPT_EXISTS, OPT_UNSET };
Tcl_Obj *arrayNameObj, *defaultValueObj;
Var *varPtr, *arrayPtr;
int isArray, option;
@@ -6659,7 +6659,7 @@ ArrayDefaultCmd(
return TCL_ERROR;
}
- switch (option) {
+ switch ((enum arrayDefaultOptionsEnum)option) {
case OPT_GET:
if (objc != 3) {
Tcl_WrongNumArgs(interp, 2, objv, "arrayName");
diff --git a/generic/tclZlib.c b/generic/tclZlib.c
index 34bf78d..e14b496 100644
--- a/generic/tclZlib.c
+++ b/generic/tclZlib.c
@@ -2398,7 +2398,7 @@ ZlibPushSubcmd(
"-dictionary", "-header", "-level", "-limit", NULL
};
const char *const *pushOptions = pushDecompressOptions;
- enum pushOptions {poDictionary, poHeader, poLevel, poLimit};
+ enum pushOptionsEnum {poDictionary, poHeader, poLevel, poLimit};
Tcl_Obj *headerObj = NULL, *compDictObj = NULL;
int limit = DEFAULT_BUFFER_SIZE, dummy;
@@ -2480,7 +2480,7 @@ ZlibPushSubcmd(
Tcl_SetErrorCode(interp, "TCL", "ZIP", "NOVAL", NULL);
return TCL_ERROR;
}
- switch ((enum pushOptions) option) {
+ switch ((enum pushOptionsEnum) option) {
case poHeader:
headerObj = objv[i];
if (Tcl_DictObjSize(interp, headerObj, &dummy) != TCL_OK) {