C-function returning a struct causes warning on missing Ctor code/spec when inside 'extern "C" {...}'
ID0002367: This issue was created automatically from Mantis Issue 2367. Further discussion may take place here.
Id | Project | Category | View | Due Date | Updated |
---|---|---|---|---|---|
ID0002367 | Frama-C | Plug-in > clang | public | 2018-02-12 | 2018-02-12 |
Reporter | Jochen | Assigned To | virgile | Resolution | open |
Priority | normal | Severity | minor | Reproducibility | always |
Platform | Sulfur-20171101 | OS | - | OS Version | Ubuntu 17.10 |
Product Version | Frama-C 16-Sulfur | Target Version | - | Fixed in Version | - |
Description :
Running "frama-c -wp equal_range_cpp.cpp" prints
[kernel] warning: Assuming declared function pair::Ctor can't throw any exception equal_range_cpp.cpp:6:[kernel] warning: Neither code nor specification for function pair::Ctor, generating default assigns from the prototype
Both messages disappear when the file is renamed to "equal_range_cpp.c" and/or the leading 'extern "C" {' and the trailing '}' are removed.