This sample would be incorrect in C++, iirc, but it is valid in modern C (sorry, I can't find the standard version when it was added first):
int main(void) {
switch(0) {
case 0: {
if (1) {
goto label;
}
label:
}
}
}
gcc works properly even w/ -std=c99 (clang fails, but looks like it's possible to fix w/ proper flags), pycparser fails with ParseError: before: }
@eliben I'm not sure if you want to support this feature, but I'd really appreciate an advice. Will try to workaround during the preprocessing stage, label:; should help here, probably.
This sample would be incorrect in C++, iirc, but it is valid in modern C (sorry, I can't find the standard version when it was added first):
gcc works properly even w/
-std=c99
(clang fails, but looks like it's possible to fix w/ proper flags), pycparser fails withParseError
:before: }
@eliben I'm not sure if you want to support this feature, but I'd really appreciate an advice. Will try to workaround during the preprocessing stage,
label:;
should help here, probably.