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.
|ID0001953||Frama-Clang||Plug-in > clang||public||2014-11-06||2015-02-16|
|Priority||normal||Severity||minor||Reproducibility||have not tried|
|Product Version||-||Target Version||-||Fixed in Version||-|
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.