Skip to content

compile-time template recursion causes "multiply-defined" errors

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


Id Project Category View Due Date Updated
ID0002038 Frama-Clang Plug-in > clang public 2014-12-18 2015-02-15
Reporter Jochen Assigned To virgile Resolution fixed
Priority normal Severity minor Reproducibility always
Platform frama-c-Neon-20140301+dev-stance OS - OS Version xubuntu-cfe13.10
Product Version - Target Version - Fixed in Version -

Description :

output:

Now output intermediate result 421.cpp:8:[kernel] user error: redefinition of '_Z3val' in the same scope. Previous declaration was at 421.cpp:8 421.cpp:8:[kernel] user error: redefinition of '_Z3val' in the same scope. Previous declaration was at 421.cpp:8 421.cpp:8:[kernel] user error: redefinition of '_Z3val' in the same scope. Previous declaration was at 421.cpp:8 421.cpp:8:[kernel] user error: redefinition of '_Z3val' in the same scope. Previous declaration was at 421.cpp:8 421.cpp:8:[kernel] user error: redefinition of '_Z3val' in the same scope. Previous declaration was at 421.cpp:8 421.cpp:8:[kernel] user error: redefinition of '_Z3val' in the same scope. Previous declaration was at 421.cpp:8 421.cpp:8:[kernel] user error: redefinition of '_Z3val' in the same scope. Previous declaration was at 421.cpp:8 421.cpp:8:[kernel] user error: redefinition of '_Z3val' in the same scope. Previous declaration was at 421.cpp:8 421.cpp:8:[kernel] user error: redefinition of '_Z3val' in the same scope. Previous declaration was at 421.cpp:8 421.cpp:8:[kernel] user error: redefinition of '_Z3val' in the same scope. Previous declaration was at 421.cpp:8 421.cpp:8:[kernel] user error: redefinition of '_Z3val' in the same scope. Previous declaration was at 421.cpp:8 421.cpp:12:[kernel] user error: redefinition of '_Z3val' in the same scope. Previous declaration was at 421.cpp:8 [kernel] user error: skipping file "421.cpp" that has errors.

The problem remains if line 8 is simplified to "enum { val = 2 };".

Attachments

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