[LLVMbugs] [Bug 22902] New: clang 3.7 requires a definition of an unused variable if -g option is specified
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Mar 13 22:22:28 PDT 2015
https://llvm.org/bugs/show_bug.cgi?id=22902
Bug ID: 22902
Summary: clang 3.7 requires a definition of an unused variable
if -g option is specified
Product: clang
Version: trunk
Hardware: All
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: kariya_mitsuru at hotmail.com
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
Created attachment 14044
--> https://llvm.org/bugs/attachment.cgi?id=14044&action=edit
clang++ -v
The sample code below is compiled and linked successfully if -g option is not
specified but it causes a linkage error if -g option is specified.
================ sample code ================
extern char dummy;
template<char&>
void f() {}
int main()
{
f<dummy>();
}
================ sample code ================
with -g option: http://melpon.org/wandbox/permlink/Bt83IkZr8Mu1bW9s
w/o -g option: http://melpon.org/wandbox/permlink/0Rgoup5odwqIrDju
Note that clang 3.3 compiles and links it successfully even though -g option is
specified.
cf. http://melpon.org/wandbox/permlink/iXtqIsBEkDBOXhpL
--
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/20150314/37bc3516/attachment.html>
More information about the llvm-bugs
mailing list