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
  • #852
Closed
Open
Issue created Nov 06, 2014 by Jochen Burghardt@burghardt

type "__fc_builtin_size_t" used in frama-c's own stddef.h version

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


Id Project Category View Due Date Updated
ID0001953 Frama-Clang Plug-in > clang public 2014-11-06 2015-02-16
Reporter Jochen Assigned To virgile Resolution fixed
Priority normal Severity minor Reproducibility have not tried
Platform frama-c-Neon-20140301+dev-stance OS - OS Version xubuntu-cfe13.10
Product Version - Target Version - Fixed in Version -

Description :

Running "gf 000.cpp" (both files attached) under linux, produces:

In file included from 000.cpp:2: In file included from ./cstddef:5: In file included from ./stddef.h:27: ./__fc_define_size_t.h:26:9: error: unknown type name '__fc_builtin_size_t' typedef __SIZE_T size_t; ^ /usr/local/share/frama-c/libc/__fc_machdep.h:26:18: note: expanded from macro '__SIZE_T' #define __SIZE_T __fc_builtin_size_t ^ code generation aborted due to one compilation error [kernel] user error: Failed to parse C++ file. See Clang messages for more information

File cstddef has been set-up according to Vigile's suggestions, and is also attached; file stddef.h is a soft-link to share/libc/stddef.h in the frama-c-Neon-20140301+dev-stance distribution.

A grep showed that the name "__fc_builtin_size_t" occurs only in the following files of that distribution:

./share/libc/__fc_machdep.h:#define __SIZE_T __fc_builtin_size_t ./cil/src/frontc/cabs2cil.ml: | [A.Tnamed "__fc_builtin_size_t"] -> Cil.theMachine.typeOfSizeOf ./cil/src/frontc/cparser.ml: let sizeofType = [SpecType (Tnamed "__fc_builtin_size_t")], JUSTBASE in ./cil/src/frontc/clexer.mll: ("__fc_builtin_size_t", fun _loc -> NAMED_TYPE "__fc_builtin_size_t"); ./cil/src/frontc/cparser.mly: let sizeofType = [SpecType (Tnamed "__fc_builtin_size_t")], JUSTBASE in ./cil/src/frontc/clexer.ml: ("__fc_builtin_size_t", fun _loc -> NAMED_TYPE "__fc_builtin_size_t"); ./src/frama-clang/cxx_utils.ml:let builtin_types = [ "__builtin_va_list"; "__fc_builtin_size_t"; ]

So if it isn't known when processing the typedef in file __fc_define_size_t.h, this is an issue of some of the above .ml files, or some include file containing "#define __fc_builtin_size_t ..." is missing in the distribution. The problem remains if I omit the option "-machdep x86_64" in the sh-script "gf" calling frama-c.

I think the above error messages are from framaCIRGen, not from frama-c, but both are installed from the frama-c-Neon-20140301+dev-stance distribution, anyway.

Attachments

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