Skip to content
Tcl Source Code View Ticket
Login

View Ticket

-Wconversion warnings, like TclAdvanceContinuations()

Open03cff7a777da6cdf7caace9f0a7d181c685ad799Created 2 years agoUpdated 2 years ago
Descriptionwiki2025-04-16 08:48:15
In the past, Tcl/Tk was compiled with -Wconversion warnings turned on. When the move was made to more 64-bit handling, this warning was removed from the CFLAGS, simply because it produced too much unuseful warnings.

As an example TclAdvanceContinuations() is normally called like this (see tclParse.c):

		TclAdvanceContinuations(&line, &clNextOuter,
			tokenPtr->start - outerScript);

Since the last argument is "int loc", a substraction of two pointer (ptrdiff_t) doesn't fit. This might be related to ticket [27b3ce2997].

There are more situations like this, let's see what we can do. The goal is _not_ to fix all -Wconversion warnings.

Referenced by2
jan.nijtmanswiki2025-04-17 14:49:09

First round of fixes [here]

Another round of fixes [here]

jan.nijtmanswiki2025-04-19 16:45:43

Third round of fixes [here]

Log in (anonymous is fine) to add a comment.