Skip to content
GitLab
Projects Groups Topics 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
    • Contributor statistics
    • Graph
    • Compare revisions
  • Issues 171
    • Issues 171
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and 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
  • #868
Closed
Open
Issue created Nov 27, 2014 by Jochen Burghardt@burghardt

suggest to suppress warning about passing void value via return statement

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


Id Project Category View Due Date Updated
ID0001998 Frama-Clang Plug-in > clang public 2014-11-27 2015-02-16
Reporter Jochen Assigned To virgile Resolution open
Priority normal Severity feature Reproducibility always
Platform frama-c-Neon-20140301+dev-stance OS - OS Version xubuntu-cfe13.10
Product Version - Target Version - Fixed in Version -

Description :

output for file "165.cpp":

Now output intermediate result 165.cpp:4:[kernel] warning: Return statement with a value in function returning void

According to Stroustrup, sect.7.3 "Value Return", the code is ok, and can make sense in templates with type parameters, cf. file "165a.cpp".

Running "g++ -Wall -pedantic 165.cpp" doesn't give a warning either.

Attachments

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