Hacker News new | ask | show | jobs
by fractalb 851 days ago
VLA support is mandatory in C23? I'd like to know the rationale behind this decision. Can you provide any references? Thanks.
1 comments

If I understand right, this is mandatory:

  void example(int n) { printf("%zu", sizeof(int[n])); }
  void example2(int n, int (*a)[n]) { }
This is optional:

  void example3(int n) { int x[n]; }