[llvm-bugs] [Bug 28909] New: __attribute__((noreturn)): Linker error with definition with same mangled name as another definition
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Aug 8 15:05:46 PDT 2016
https://llvm.org/bugs/show_bug.cgi?id=28909
Bug ID: 28909
Summary: __attribute__((noreturn)): Linker error with
definition with same mangled name as another
definition
Product: clang
Version: 3.9
Hardware: PC
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: martongabesz at gmail.com
CC: dgregor at apple.com, llvm-bugs at lists.llvm.org
Classification: Unclassified
Created attachment 16915
--> https://llvm.org/bugs/attachment.cgi?id=16915&action=edit
code snipet to reproduce the bug
The above code snippet should compile without any error, but it fails.
void f1(int) __attribute__((noreturn)); // ERROR
//void f1(int) __dead2 // ERROR
//[[noreturn]] void f1(int); // OK
void f2(int);
template <typename T>
void Buggy(T t) {}
void test() {
Buggy(f1);
Buggy(f2);
}
Comiplie with:
clang++ --std=c++11 -c NoReturnBug.cpp
Produced error message:
NoReturnBug.cpp:7:6: error: definition with same mangled name as another
definition
void Buggy(T t) {}
^
NoReturnBug.cpp:7:6: note: previous definition is here
1 error generated.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160808/db2fb41a/attachment.html>
More information about the llvm-bugs
mailing list