D issues are now tracked on GitHub. This Bugzilla instance remains as a read-only archive.
Issue 20573 - typeinfo error when using more than six switch cases in Dbetterc
Summary: typeinfo error when using more than six switch cases in Dbetterc
Status: RESOLVED DUPLICATE of issue 20613
Alias: None
Product: D
Classification: Unclassified
Component: dmd (show other issues)
Version: D2
Hardware: x86_64 Linux
: P1 trivial
Assignee: No Owner
URL:
Keywords: betterC
Depends on:
Blocks:
 
Reported: 2020-02-09 14:20 UTC by Raoof Hajibagheran
Modified: 2022-06-08 17:37 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description Raoof Hajibagheran 2020-02-09 14:20:16 UTC
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 basile-z 2020-02-11 02:25:14 UTC
This bug is illarious. "Pay as you go", well well well, nobody paid for typeinfo by writing a switch.
Comment 2 Dennis 2022-06-08 17:37:47 UTC

*** This issue has been marked as a duplicate of issue 20613 ***