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: unassignedclangb...@nondot.org Reporter: martongab...@gmail.com CC: dgre...@apple.com, llvm-bugs@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.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs