Frama-C Bug Tracking System - Frama-C
View Issue Details
0002186Frama-CKernelpublic2015-11-03 16:082018-11-30 10:44
Frama-C Sodium 
0002186: 2D variable length array
2D variable length arrays are valid wrt C99 but rejected by Frama-C:

extern int n;

int main(void) {
  int a[n]; // accepted
  int b[n][n]; // should be accepted, but refused
  return 0;

$ frama-c a.i
[kernel] Parsing FRAMAC_SHARE/libc/__fc_builtin_for_normalization.i (no preprocessing)
[kernel] Parsing a.i (no preprocessing)
a.i:4:[kernel] warning: Variable-sized local variable a
a.i:5:[kernel] user error: Length of array is not a constant: n
a.i:5:[kernel] warning: Variable-sized local variable b
[kernel] user error: stopping on file "a.i" that has errors.
[kernel] Frama-C aborted: invalid user input.
Reported by email by G. Karpenkov
No tags attached.
duplicate of 0001718assigned virgile Nested VLA are not supported 
Issue History
2015-11-03 16:08signolesNew Issue
2015-11-03 16:08signolesStatusnew => assigned
2015-11-03 16:08signolesAssigned To => virgile
2015-11-03 22:41yakobowskiRelationship addedduplicate of 0001718
2018-11-30 10:44signolesStatusassigned => closed
2018-11-30 10:44signolesResolutionopen => duplicate

There are no notes attached to this issue.