http://codepad.org/jnZoVbI1
を見て試してみた。
#include <stdio.h>
int main(void)
{
int x = 2;
switch (x) {
case 1:
printf("1\n");
break;
defautl:
printf("other\n");
break;
}
return 0;
}
gcc でコンパイルは通るが結果が 1 も other も表示されない。-Wall ならば warning が出る。ラベルとして扱われ任意の文字列が許されてしまうようだ。
main.c:12: warning: label ‘defautl’ defined but not used