www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 20573] New: typeinfo error when using more than six switch

https://issues.dlang.org/show_bug.cgi?id=20573

          Issue ID: 20573
           Summary: typeinfo error when using more than six switch cases
                    in Dbetterc
           Product: D
           Version: D2
          Hardware: x86_64
                OS: Linux
            Status: NEW
          Severity: trivial
          Priority: P1
         Component: dmd
          Assignee: nobody puremagic.com
          Reporter: raoofha yahoo.com

hi everybody and thanks for D(betterC)
---------------------
/*
echo -ne "\033c"

sdir=`dirname $0`
odir=${sdir}

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

--
Feb 09 2020