3 ms·
It's a compile time error, e.g. void foo(int x) { goto label; { char y[x]; label: y[0] = 'a'; } } alloca-goto.c: In functi
by dbaupp 12y ago
It's a compile time error, e.g.
void foo(int x) {
goto label;
{
char y[x];
label:
y[0] = 'a';
}
}
alloca-goto.c: In function ‘foo’:
alloca-goto.c:2:5: error: jump into scope of identifier with variably modified type
goto label;
^
alloca-goto.c:5:1: note: label ‘label’ defined here
label:
^
alloca-goto.c:4:14: note: ‘y’ declared here
char y[x];
^