July 29, 2005 compiler crash! | ||||
---|---|---|---|---|
| ||||
The following piece of code crashes the compiler (at least the Win32 version). int main() { int u=2; switch(u) { case 1: void j() { case 2: u++; } break; } } |
July 29, 2005 Re: compiler crash! | ||||
---|---|---|---|---|
| ||||
Posted in reply to pguerra.ar | In article <dccftv$o1b$1@digitaldaemon.com>, pguerra.ar@gmail.com says... > >The following piece of code crashes the compiler (at least the Win32 version). > >int main() >{ >int u=2; > >switch(u) >{ >case 1: >void j() >{ >case 2: >u++; >} >break; >} >} > > What the... Is that even legal?!? Yah, it shouldn't crash the compiler. But how the heck did you end up with having a case tag in a nested function??? |
Copyright © 1999-2021 by the D Language Foundation