Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • F frama-c
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 204
    • Issues 204
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Packages & Registries
    • Packages & Registries
    • Container Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • pub
  • frama-c
  • Issues
  • #223
Closed
Open
Created Nov 03, 2015 by Julien Signoles@signolesDeveloper

2D variable length array

ID0002186: This issue was created automatically from Mantis Issue 2186. Further discussion may take place here.


Id Project Category View Due Date Updated
ID0002186 Frama-C Kernel public 2015-11-03 2018-11-30
Reporter signoles Assigned To virgile Resolution duplicate
Priority normal Severity major Reproducibility always
Platform - OS - OS Version -
Product Version Frama-C Sodium Target Version - Fixed in Version -

Description :

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.

Additional Information :

Reported by email by G. Karpenkov

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking