Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: moved vla size validation to inside func in compliant example

...

Code Block
bgColor#ccccff
enum { MAX_ARRAY = 1024 };

void func(size_t s) {
   int vla[s];
   /* ... */
}

/* ... */
if (s < MAX_ARRAY && s != 0) {
    int func(vla[s)];
}
    /* ... */
  } else {
    /* Handle Error */
  }
}

/* ... */
func(size);
/* ... */

Implementation Details

...