このコードは、エラーなしでコンパイルおよび実行されます。しかし、どのように?
#include <stdio.h>
int main (void)
{
int foo[2];
foo[8] = 4; /* How could this happen? */
printf("%d\n", foo[8]);
return 0;
}
ArchLinuxx86_64でGCC4.7.2をコンパイルしています。
gcc -Wall -o "main" "main.c"