Code sample:
int main(int argc, char **argv){ switch(argc) { case 0: argc = 5; __attribute__((fallthrough)); case 1: break; }}
Using gcc 6.3.0, with -std=c11
only, this code gives a warning:
<source>: In function 'main':7 : <source>:7:3: warning: empty declaration __attribute__((fallthrough)); ^~~~~~~~~~~~~
What is the correct way to use this without eliciting a warning?