Tcl Source Code

Check-in [cf3e4e5c76]
Login
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Merge core-8-6-branch. Fix gcc warning: tclStrToD.c:1180:2: warning: enumeration value ‘ZERO_D’ not handled in switch [-Wswitch] switch (acceptState) {
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | bsg-0d-radix-prefix
Files: files | file ages | folders
SHA1: cf3e4e5c76049fbb9b557faecaa95cf05a00cd60
User & Date: jan.nijtmans 2017-06-15 11:01:58
Context
2017-06-22
08:16
Merge core-8-6-branch Closed-Leaf check-in: 7a62143dca user: jan.nijtmans tags: bsg-0d-radix-prefix
2017-06-15
11:01
Merge core-8-6-branch. Fix gcc warning: tclStrToD.c:1180:2: warning: enumeration value ‘ZERO_D’... check-in: cf3e4e5c76 user: jan.nijtmans tags: bsg-0d-radix-prefix
09:13
Make panic in TclParseNumber() work when IEEE_FLOATING_POINT is not defined. check-in: 512a5af394 user: jan.nijtmans tags: core-8-6-branch
2017-06-14
07:54
Rebase to core-8-6-branch (who told that fossil doesn't know how to rebase ....) check-in: ae4471b37c user: jan.nijtmans tags: bsg-0d-radix-prefix
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to doc/dict.n.

433
434
435
436
437
438
439
440
441
442
443
444
445
.CS
set foo {foo {a b} bar 2 baz 3}
\fBdict with\fR foo {}
puts $foo
#    prints: \fIa b foo {a b} bar 2 baz 3\fR
.CE
.SH "SEE ALSO"
append(n), array(n), foreach(n), mapeach(n), incr(n), list(n), lappend(n), set(n)
.SH KEYWORDS
dictionary, create, update, lookup, iterate, filter, map
'\" Local Variables:
'\" mode: nroff
'\" End:






|





433
434
435
436
437
438
439
440
441
442
443
444
445
.CS
set foo {foo {a b} bar 2 baz 3}
\fBdict with\fR foo {}
puts $foo
#    prints: \fIa b foo {a b} bar 2 baz 3\fR
.CE
.SH "SEE ALSO"
append(n), array(n), foreach(n), incr(n), list(n), lappend(n), lmap(n), set(n)
.SH KEYWORDS
dictionary, create, update, lookup, iterate, filter, map
'\" Local Variables:
'\" mode: nroff
'\" End:

Changes to generic/tclStrToD.c.

1179
1180
1181
1182
1183
1184
1185

1186
1187
1188
1189
1190
1191
1192
....
1193
1194
1195
1196
1197
1198
1199

1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
	TclFreeIntRep(objPtr);
	switch (acceptState) {
	case SIGNUM:
	case BAD_OCTAL:
	case ZERO_X:
	case ZERO_O:
	case ZERO_B:

	case LEADING_RADIX_POINT:
	case EXPONENT_START:
	case EXPONENT_SIGNUM:
	case sI:
	case sIN:
	case sINFI:
	case sINFIN:
................................................................................
	case sINFINI:
	case sINFINIT:
#ifdef IEEE_FLOATING_POINT
	case sN:
	case sNA:
	case sNANPAREN:
	case sNANHEX:

	    Tcl_Panic("TclParseNumber: bad acceptState %d parsing '%s'",
		    acceptState, bytes);
#endif
	case BINARY:
	    shift = numTrailZeros;
	    if (!significandOverflow && significandWide != 0 &&
		    ((size_t)shift >= CHAR_BIT*sizeof(Tcl_WideUInt) ||
		    significandWide > (MOST_BITS + signum) >> shift)) {
		significandOverflow = 1;
		TclBNInitBignumFromWideUInt(&significandBig, significandWide);






>







 







>


<







1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
....
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203

1204
1205
1206
1207
1208
1209
1210
	TclFreeIntRep(objPtr);
	switch (acceptState) {
	case SIGNUM:
	case BAD_OCTAL:
	case ZERO_X:
	case ZERO_O:
	case ZERO_B:
	case ZERO_D:
	case LEADING_RADIX_POINT:
	case EXPONENT_START:
	case EXPONENT_SIGNUM:
	case sI:
	case sIN:
	case sINFI:
	case sINFIN:
................................................................................
	case sINFINI:
	case sINFINIT:
#ifdef IEEE_FLOATING_POINT
	case sN:
	case sNA:
	case sNANPAREN:
	case sNANHEX:
#endif
	    Tcl_Panic("TclParseNumber: bad acceptState %d parsing '%s'",
		    acceptState, bytes);

	case BINARY:
	    shift = numTrailZeros;
	    if (!significandOverflow && significandWide != 0 &&
		    ((size_t)shift >= CHAR_BIT*sizeof(Tcl_WideUInt) ||
		    significandWide > (MOST_BITS + signum) >> shift)) {
		significandOverflow = 1;
		TclBNInitBignumFromWideUInt(&significandBig, significandWide);