Tcl Source Code

View Ticket
Login
Ticket UUID: bf482486b99d0a680fbfa690e8f9b30692f82665
Title: MS-VC6 compile error in 8.6: 'long' followed by 'long' is illegal
Type: Bug Created on: 2026-03-12 09:16:33
Submitter: oehhar Assigned to: jan.nijtmans
Subsystem: 52. Portability Support Severity: Minor
Priority: 5 Medium Last modified: 2026-03-12 11:31:14
Status: Closed Closed by: jan.nijtmans
Resolution: Fixed Closed on: 2026-03-12 11:31:14
Version: core-8-6-branch
Description:
Sorry,
with MS-VC6++ 32 bit, the curren core-8-6-branch does not compile any more.

The error lines are:

<verbatim>
C:\test\fossil\tcl\core-8-6-branch\win\..\compat\zlib\zlib.h(2016) : error C2632: 'long' followed by 'long' is illegal
C:\test\fossil\tcl\core-8-6-branch\win\..\compat\zlib\zlib.h(2016) : error C2632: 'long' followed by 'long' is illegal
C:\test\fossil\tcl\core-8-6-branch\win\..\compat\zlib\zlib.h(2017) : error C2632: 'long' followed by 'long' is illegal
C:\test\fossil\tcl\core-8-6-branch\win\..\compat\zlib\zlib.h(2018) : error C2632: 'long' followed by 'long' is illegal
C:\test\fossil\tcl\core-8-6-branch\win\..\compat\zlib\zlib.h(2019) : error C2632: 'long' followed by 'long' is illegal
C:\test\fossil\tcl\core-8-6-branch\win\..\compat\zlib\zlib.h(2020) : error C2632: 'long' followed by 'long' is illegal
C:\test\fossil\tcl\core-8-6-branch\win\..\compat\zlib\zlib.h(2021) : error C2632: 'long' followed by 'long' is illegal
</verbatim>

Sorry,
Harald
User Comments:
jan.nijtmans added on 2026-03-12 10:26:40:

Does [a9796c128700d56d|this] work?

This was introduced in zlib, already almost 2 years ago: https://github.com/madler/zlib/commit/c5e87dcdef72abfb599579bb1b8176948be979c9

I don't think it's worth to report this upstream ....


oehhar added on 2026-03-12 10:50:27:

Yes, that compiles well. Light speed solution !

I have the following unrelated and ignored warning while compiling:

generic\tclProc.c(2275) : warning C4550: expression evaluates to a function which is missing an argument list

Thanks for all, Harald


jan.nijtmans added on 2026-03-12 11:00:44:

Easiest would be just disable it: [f2e024b717e638a5]

It's a false-positive anyway


oehhar added on 2026-03-12 11:22:42:

Fix for the warning is effective. No more comments, ready to merge.

Thanks for all, Harald


jan.nijtmans added on 2026-03-12 11:31:14:

[merged|f597e6a51ad4a54f]

There is no need to mention this change in the changelog, since it can be considered as part of the zlib upgrade, and it was never published in any official Tcl release.