3 ms·
Why did I not know that this: case 1 ... 10: Is valid C? I have been programming in C for years, what standard is this from?
by nj5rq 2y ago
Why did I not know that this:
case 1 ... 10:
Is valid C? I have been programming in C for years, what standard is this from?
- G4E 2y agoUnless it has been recently standardized it's not valid C, it's a GNU extension.
- dekhn 2y agoIt appears to be a GNU C extension: https://gcc.gnu.org/onlinedocs/gcc/Case-Ranges.html https://gcc.gnu.org/onlinedocs/gcc/Case-Ranges.html but I couldn't find the history of the extension. I believe it is not in standard C (not sure about clang).