Open sparkforreg opened 6 months ago
This isn't a bug per se, but a reasonable enhancement request--we don't yet support this nonstandard extension to C.
I hadn't realized this extension existed, but it seems widely supported (by GCC, Clang, and Sun's compilers at least) so it might be worth handling. Doing so would involve checking caseStmtIsGNURange
when processing the Clang AST and probably rejiggering our CStmtKind
enum a bit to be able to carry the information needed for range case statements.
thanks for checking
Is it a bug that case with a range is not translated correctly?
here is a c code example
switch(5) { case 3 … 7 : print(“1”); default: print(“2”); }