summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorandreas_kupries <akupries@shaw.ca>2009-10-23 19:29:26 (GMT)
committerandreas_kupries <akupries@shaw.ca>2009-10-23 19:29:26 (GMT)
commita7ee7c68c1945c3924c15bad6693af21314f4c12 (patch)
tree0021513d15dff2dd400670eb79adf29b78b88bfb
parent2cf3aa02dee40bb7023ecf5a2b50f52bb193ba74 (diff)
downloadtcl-a7ee7c68c1945c3924c15bad6693af21314f4c12.zip
tcl-a7ee7c68c1945c3924c15bad6693af21314f4c12.tar.gz
tcl-a7ee7c68c1945c3924c15bad6693af21314f4c12.tar.bz2
* generic/tclCompCmds.c: [Bug 2881263] (TclCompileForeachCmd,
TclCompileLindexCmd): Fixed. Moved the use of DefineLineInformation after all regular variable declarations, so that an empty statement (-UTIP_280) doesn't confuse c89 compilers.
-rw-r--r--ChangeLog5
-rw-r--r--generic/tclCompCmds.c7
2 files changed, 9 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 99cec01..b238882 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2009-10-23 Andreas Kupries <andreask@activestate.com>
+ * generic/tclCompCmds.c: [Bug 2881263] (TclCompileForeachCmd,
+ TclCompileLindexCmd): Fixed. Moved the use of
+ DefineLineInformation after all regular variable declarations, so
+ that an empty statement (-UTIP_280) doesn't confuse c89 compilers.
+
* library/platform/pkgIndex.tcl: Backported the platform packages
* library/platform/platform.tcl: from head and8.5 into the 8.4
* library/platform/shell.tcl: branch. Updated makefiles to install
diff --git a/generic/tclCompCmds.c b/generic/tclCompCmds.c
index 26c387b..12f127e 100644
--- a/generic/tclCompCmds.c
+++ b/generic/tclCompCmds.c
@@ -11,7 +11,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclCompCmds.c,v 1.39.2.8 2009/08/25 20:59:10 andreas_kupries Exp $
+ * RCS: @(#) $Id: tclCompCmds.c,v 1.39.2.9 2009/10/23 19:29:26 andreas_kupries Exp $
*/
#include "tclInt.h"
@@ -769,7 +769,6 @@ TclCompileForeachCmd(interp, parsePtr, envPtr)
char buffer[32 + TCL_INTEGER_SPACE];
int savedStackDepth = envPtr->currStackDepth;
- DefineLineInformation;
#ifdef TCL_TIP280
int bodyIndex;
#endif
@@ -786,6 +785,8 @@ TclCompileForeachCmd(interp, parsePtr, envPtr)
int *varcList = varcListStaticSpace;
CONST char ***varvList = varvListStaticSpace;
+ DefineLineInformation;
+
/*
* If the foreach command isn't in a procedure, don't compile it inline:
* the payoff is too small.
@@ -1851,10 +1852,10 @@ TclCompileLindexCmd(interp, parsePtr, envPtr)
{
Tcl_Token *varTokenPtr;
int code, i;
+ int numWords;
DefineLineInformation;
- int numWords;
numWords = parsePtr->numWords;
/*