1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
#include <stdio.h> #include <stdlib.h> void neverExecuted() { puts("never\n"); } void executed() { puts("executed\n"); } int main(){ int c = 1; switch(c) { default: neverExecuted(); break; default: executed(); } return 0; }
1 2 3
In function 'main': Line 13: error: multiple default labels in one switch Line 12: error: this is the first default label