TCC 14.02.37 CMD Compatibility Loss?

May 31, 2008
62
0
Oklahoma
Through TCC 14.02.36 I had been running a CMD batch file distributed with the Windows port of Git under TCC with no problems. After the upgrade to TCC 14.02.37, the batch file fails.

I believe that the failure is caused by a change (regression? ;)) in the support of the special syntax for compatibility with CMDs syntax for referencing batch file parameters and the control variable of the FOR command. The indicated lines in the following CMD batch file and the outputs illustrate the difference.

Code:
why.cmd
@for /f "delims=" %%I in ("%~dp0..") do @echo %%I
@for /f "delims=" %%I in ("%~dp0..") do @echo %%~fI    <==
 
Microsoft Windows XP [Version 5.1.2600]
C:\Documents and Settings\rchapman>why.cmd
C:\Documents and Settings\rchapman\..
C:\Documents and Settings    <--

TCC  14.02.36   Windows XP [Version 5.1.2600]
[C:\Documents and Settings\rchapman]why.cmd
C:\Documents and Settings\rchapman\..
C:\Documents and Settings    <--

TCC  14.02.37   Windows XP [Version 5.1.2600]
[C:\Documents and Settings\rchapman]why.cmd
C:\Documents and Settings\rchapman..
C:\Documents and Settings\rchapman..    <--

I know that this may be a pretty bizarre use of CMDs syntax and that the TCC variable functions offer a superior method of stripping the path but:
  1. I'm lazy and would like to use the CMD batch file as distributed :)
  2. If the change was intentional, I would like to know "why" for my education.
Thanks
 
Sep 21, 2012
4
0
My open source development tools use bash scripts for Linux and cmd scripts for Windows. Everything stopped working a couple of days ago. I thought I upgraded the tools and broken something. I finally switched back to cmd.exe and everything worked. I realized the scripts make heavy use of %p0. It's behavior just changed recently in TCC to not return a trailing '\'.
 
Similar threads
Thread starter Title Forum Replies Date
L FTYPE in TCC, less quirky than in cmd.exe Support 3
FreezerBurnt Help making a CMD and TCC compatible batch file Support 7
D Differences between TCC and CMD with COPY /b Support 4
M Oracle batch OPatch.bat.bat not working in TCC but correctly in CMD Support 5
E TCC/CMD difference Support 5
R Difference between TCC and CMD: variable names with hyphens Support 4
M WAD "Pictures" directory is empty in TCC but not in CMD or Explorer Support 4
W Starting program for word to pdf conversion (difference cmd and tcc) Support 13
Joe Caverly Using this CMD technique from TCC Support 17
I how to make TCC default/replace cmd.exe? Support 9
R FOR usage error from TCC but not from CMD Support 16
I findstr works in cmd but not in tcc Support 5
D Pasting Unicode data has different behavior on TCC and CMD Support 2
M Command line parsing differences between cmd.exe and TCC Support 6
Joe Caverly Works with CMD.EXE, no output with TCC.EXE Support 7
K CMD, TCC, VisualStudio 2017, VcVars* differences Support 1
D Does TCC improve CMD's implementation of ECHO? Support 6
P Labels in batch files: TCC vs CMD.exe Support 9
T WAD Difference between TCC and CMD in handling multi-command lines Support 6
C Nested IF syntax — TCC behaving differently to CMD Support 12
P Fixed Rexx .cmd files no longer work in TCC 20 Support 3
TT's Help! Uninstalling TCC did not restore cmd.exe as Win10 default batch file processor. Support 4
vefatica START, CMD vs. TCC Support 0
jogi Problem with FOR statement in TCC but not M$ CMD Support 1
vefatica SET /A "var%=N", TCC vs. CMD Support 0
noahcoad WAD cmd.exe under tcc doesn't find apps Support 4
tmaynard WAD Leiningen broken with TCC (but OK with CMD) Support 12
W /g option (%) on MOVE cmd appears broken TCC 14.03.57 x64 Support 8
noahcoad c:/hello.txt works in cmd.exe but not tcc.exe Support 1
noahcoad Fixed tcc /k not emulating cmd.exe w double quotes Support 1
Stefano Piccardi 13.0.31 2 MKLINK TCC vs CMD issues Support 2
daniel347x Different results with TCC than with cmd.exe Support 2
CWBillow TCC and CMD / BAT files Support 3
B %ProgramFiles(x86)% returns different values in TCC and CMD Support 3
D Peculiar symptoms w/ 4NT, TCC/LE vis a vis CMD.EXE Support 11
J Happy CMD/TCC incompatibility Support 0
P PSHELL not working in TCC 26 Support 0
vefatica SCRIPT makes TCC disappear. Support 16
MickeyF TCC suddenly crashing (not TCC's fault) Support 2
Z CMDDebug - TCC unknown command Support 2
rconn News Take Command / TCC / CMDebug / TCC-RT 28.02.17 Support 0
vefatica TCC startup: /IP not honored after /K Support 1
MickeyF TCC crashing when copying multiple files (now resolved) Support 6
C COMSPEC constantly reset to TCC.EXE Support 6
rconn News Take Command / TCC / CMDebug / TCC-RT v28 Released Support 0
C How to? starting TCC/TCMD v25 Support 2
CWBillow TCC and TCMD in Powershell Support 6
rconn News Take Command / TCC / CMDebug / TCC-RT 27.01.24 uploaded Support 0
rconn News Take Command / TCC / CMDebug / TCC-RT 27.01.23 uploaded Support 0
Alpengreis Fixed Crash after copy dialog with big TCC.exception.log Support 5

Similar threads