Why is “defau4t” legal in a switch statement? [duplicate]

The token is not considered to be a keyword at all. This is a goto jump mark named “defau4t” pointing at otherwise dead code (after the break; of case '2':)…

Try this for laughs (and an endless loop):

switch(a)
{
     case '1': printf("one");
               break;
     case '2': printf("two");
               break;
     defau4t: printf("none");
     default: goto defau4t;
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)