summaryrefslogtreecommitdiffstats
path: root/generic/tclScan.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2025-06-02 14:18:14 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2025-06-02 14:18:14 (GMT)
commit56ec7b2901a5eb8c2d48aba65eee5eb82640b152 (patch)
tree77a3f7014e0fcca3ed885427f2b25851bdc4158e /generic/tclScan.c
parentf145c7fbd2a82a5f77eae1301caceb376bc4f8dd (diff)
downloadtcl-56ec7b2901a5eb8c2d48aba65eee5eb82640b152.zip
tcl-56ec7b2901a5eb8c2d48aba65eee5eb82640b152.tar.gz
tcl-56ec7b2901a5eb8c2d48aba65eee5eb82640b152.tar.bz2
Backport: Add [[unreachable]] and [[fallthrough]] from C23 (where available)
Diffstat (limited to 'generic/tclScan.c')
-rw-r--r--generic/tclScan.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/generic/tclScan.c b/generic/tclScan.c
index ba7cb72..feddedc 100644
--- a/generic/tclScan.c
+++ b/generic/tclScan.c
@@ -396,11 +396,11 @@ ValidateFormat(
format += TclUtfToUniChar(format, &ch);
break;
}
- /* FALLTHRU */
+ TCL_FALLTHROUGH();
case 'j':
case 'q':
flags |= SCAN_LONGER;
- /* FALLTHRU */
+ TCL_FALLTHROUGH();
case 'h':
format += TclUtfToUniChar(format, &ch);
}
@@ -422,7 +422,7 @@ ValidateFormat(
Tcl_SetErrorCode(interp, "TCL", "FORMAT", "BADWIDTH", (char *)NULL);
goto error;
}
- /* FALLTHRU */
+ TCL_FALLTHROUGH();
case 'n':
case 's':
if (flags & (SCAN_LONGER|SCAN_BIG)) {
@@ -436,9 +436,7 @@ ValidateFormat(
Tcl_SetErrorCode(interp, "TCL", "FORMAT", "BADSIZE", (char *)NULL);
goto error;
}
- /*
- * Fall through!
- */
+ TCL_FALLTHROUGH();
case 'd':
case 'e':
case 'E':
@@ -749,11 +747,11 @@ Tcl_ScanObjCmd(
format += TclUtfToUniChar(format, &ch);
break;
}
- /* FALLTHRU */
+ TCL_FALLTHROUGH();
case 'j':
case 'q':
flags |= SCAN_LONGER;
- /* FALLTHRU */
+ TCL_FALLTHROUGH();
case 'h':
format += TclUtfToUniChar(format, &ch);
}