Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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];
                ^


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: