fuhsnn / slimcc

C11 compiler with GNU extensions for x86-64 Linux, working towards C23
MIT License
34 stars 4 forks source link

Variably-modified type with `static` specifier #13

Closed fuhsnn closed 11 months ago

fuhsnn commented 11 months ago

This is valid pattern but crashes chibicc

int fn(int sz) {
  static char (*p)[sz];
  return sizeof *p; // == sz
}