[LLVMbugs] [Bug 12457] New: libstdc++4.7 requires various math builtins to be constant expressions
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Apr 3 23:31:44 PDT 2012
http://llvm.org/bugs/show_bug.cgi?id=12457
Bug #: 12457
Summary: libstdc++4.7 requires various math builtins to be
constant expressions
Product: clang
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++11
AssignedTo: unassignedclangbugs at nondot.org
ReportedBy: richard-llvm at metafoo.co.uk
CC: dgregor at apple.com, llvmbugs at cs.uiuc.edu
Classification: Unclassified
libstdc++4.7 declares a bunch of <cmath> functions as constexpr, defined as
calling __builtin_foo. This doesn't work: those builtins aren't treated as
potential constant expressions. Consequently we reject this code:
cmath:107:3: error: constexpr function never produces a constant expression
acos(float __x)
^
cmath:108:12: note: non-constexpr function '__builtin_acosf' cannot be used in
a constant expression
{ return __builtin_acosf(__x); }
^
cmath:108:12: note: declared here
--
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