Saturday, September 1, 2018

Case Ranges

in the Linux kernel, you can find below code

switch (val) { case 1 ... 10:         /* ... */         break; case 11 ... 20:         /* ... */         break; default:         /* ... */ }
It is a GCC extension.




No comments: