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 168
    • Issues 168
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Packages and registries
    • Packages and registries
    • Container Registry
    • Model experiments
  • 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
  • #840

#include <foo> falls back to #include "foo" with misleading warning text

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


Id Project Category View Due Date Updated
ID0001947 Frama-Clang Plug-in > clang public 2014-10-30 2015-02-17
Reporter Jochen Assigned To virgile Resolution won't fix
Priority normal Severity feature Reproducibility always
Platform frama-c-Neon-20140301+dev-stance OS xubuntu-cfe13.10 OS Version -
Product Version - Target Version - Fixed in Version -

Description :

Calling 'frama-c 080.cpp', with 080foo.h residing in the same directory, the following output results:

080.cpp:2:10: error: '080foo.h' file not found with include; use "quotes" instead #include <080foo.h> ^~~~~~~~~~ "080foo.h" In file included from 080.cpp:2: ./080foo.h:2:2: error: included file 080foo.h #error included file 080foo.h ^ code generation aborted due to compilation errors [kernel] user error: Failed to parse C++ file. See Clang messages for more information [kernel] user error: skipping file "080.cpp" that has errors. [kernel] Frama-C aborted: invalid user input.

In contrast, the g++ compiler fails since '080foo.h' isn't found in '/usr/include'. Apparently, Frama-C issues its first line as an error message, but then nevertheless continues, trying '#include "080foo.cpp"', rather than aborting. If that behavior (which is equivalent to have an implicit option '-I .' which can't be avoided by the user) is kept, Frama-C should issue a warning, saying '... using "quotes" ...' rather than '... use "quotes" ...'.

Attachments

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