Skip to content

Missing __END_DECLS in ./share/libc/__fc_alloc_axiomatic.h

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


Id Project Category View Due Date Updated
ID0002400 Frama-C Plug-in > clang public 2018-09-21 2018-09-21
Reporter richardlford Assigned To virgile Resolution fixed
Priority normal Severity major Reproducibility always
Platform x86_64 OS Ubuntu via WSL OS Version 16
Product Version Frama-C 17-Chlorine Target Version - Fixed in Version Frama-C 17-Chlorine

Description :

In file ./share/libc/__fc_alloc_axiomatic.h there is a __BEGIN_DECLS but no matching __END_DECLS.

When __BEGIN_DECLS expands to 'extern "C" {' and __END_DECLS expands to '}' this results in miss-matched braces and the following code appears to be under and extern "C". This leads to errors, e.g. when template definitions are encountered.

Additional Information :

Adding in the missing __END_DECLS removes this problem.

Steps To Reproduce :

Install Frama-C Chlorine and frama-clang-0.0.6.

use the command "frama-c version.cpp" where version.cpp has this content:

// 'Hello World!' program

#include int main() { std::cout << "Hello World, version is "<< __cplusplus << "!" << std::endl; return 0; }

Attachments

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