[LLVMbugs] [Bug 12669] New: Constant expressions in constant context not evaluated as such
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Wed Apr 25 18:58:18 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=12669
Bug #: 12669
Summary: Constant expressions in constant context not evaluated
as such
Product: clang
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: llvm-bugs at quasiparticle.net
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
The attached code returns 1 when compiled with -O2 or higher, and fails to link
otherwise. Either the program does not admit a constexpr foo::contains (which
clang should diagnose here in all cases, since the function is used in constant
context), or the optimizers are smarter than the clang constexpr evaluator.
--
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.
More information about the llvm-bugs
mailing list