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
  • #2304
Closed
Open
Created Aug 02, 2010 by Pascal Cuoq@pascal

Checking number of arguments passed to C functions

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


Id Project Category View Due Date Updated
ID0000552 Frama-C Kernel public 2010-08-02 2010-12-17
Reporter pascal Assigned To virgile Resolution fixed
Priority normal Severity feature Reproducibility always
Platform - OS - OS Version -
Product Version Frama-C Boron-20100401 Target Version - Fixed in Version Frama-C Carbon-20101201-beta1

Description :

There currently isn't much checking of function arguments in the front-end. The following program is accepted, although it passes the wrong number of arguments for both calls to retint:

int retint(int x ) { int __retres ; __retres = 42 + x; return (__retres); }

int main(int c ) { int x ; int tmp ; x = retint(); tmp = retint(c,c); return (tmp); }

Arguments for not implementing this feature: there are perfectly good compilers to check for this, and not having rigid rules in place may even help with older code containing variadic functions. I am not sure when the current convention for declaring variadic functions became standardized, and it may not have been from the beginning.

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