Bug 20573 – typeinfo error when using more than six switch cases in Dbetterc
Status
RESOLVED
Resolution
DUPLICATE
Severity
trivial
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2020-02-09T14:20:16Z
Last change time
2022-06-08T17:37:47Z
Keywords
betterC
Assigned to
No Owner
Creator
Raoof Hajibagheran
Comments
Comment #0 by raoofha — 2020-02-09T14:20:16Z
hi everybody and thanks for D(betterC)
---------------------
/*
echo -ne "\033c"
sdir=`dirname $0`
odir=${sdir}
ofilename=`basename $0 .${0##*.}`
ofilepath=${odir}/${ofilename}
dmd -betterC $0 -of$ofilepath -J$sdir &&
$ofilepath ; echo $?
exit 1
*/
extern (C) void main() {
string s = "hello";
switch(s) {
case "1":
case "2":
case "3":
case "4":
case "5":
case "6":
case "7":
default:
}
}
--------------------
/usr/include/dmd/druntime/import/object.d(2980): Error: TypeInfo cannot be used with -betterC
Comment #1 by b2.temp — 2020-02-11T02:25:14Z
This bug is illarious. "Pay as you go", well well well, nobody paid for typeinfo by writing a switch.
Comment #2 by dkorpel — 2022-06-08T17:37:47Z
*** This issue has been marked as a duplicate of issue 20613 ***