[LLVMbugs] [Bug 19341] enabling debuginfo with -g causes an undefined reference error at link time
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Fri Apr 18 10:29:59 PDT 2014
http://llvm.org/bugs/show_bug.cgi?id=19341
Paul Robinson <paul_robinson at playstation.sony.com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution|--- |INVALID
--- Comment #5 from Paul Robinson <paul_robinson at playstation.sony.com> ---
(In reply to comment #3)
> I /believe/ the code has UB, no diagnostic required by ODR-using the
> variable but never defining it. Though I haven't looked at all the wording
> necessary to back that up with certainty.
You are right, I was wrong.
The template-argument for these things is a constant expression (14.3.2p1).
ODR says a constant expression does not ODR-use the vars or functions named
in the expression, if the lvalue-to-rvalue conversion is immediately applied.
But lvalue-to-rvalue conversion is not in the list of conversions applied to
a template argument (14.3.2p5).
So it is legit for the debug info to assume a definition.
I'm closing this PR and withdrawing the patch.
--
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/20140418/acfed56a/attachment.html>
More information about the llvm-bugs
mailing list