[llvm-bugs] [Bug 36334] New: constexpr function never produces a constant expression [-Winvalid-constexpr]
via llvm-bugs
llvm-bugs at lists.llvm.org
Sat Feb 10 06:29:37 PST 2018
https://bugs.llvm.org/show_bug.cgi?id=36334
Bug ID: 36334
Summary: constexpr function never produces a constant
expression [-Winvalid-constexpr]
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: C++14
Assignee: unassignedclangbugs at nondot.org
Reporter: weiss at wsoptics.de
CC: llvm-bugs at lists.llvm.org
In our code base, we cannot use `assert()` in constexpr functions any more
(libstdc++).
I ran creduce to get a minimal test case, and this is it:
constexpr int a() { ({ ; }); return 0; }
Compiling it gives:
% clang++ -c -std=c++14 a.ii
a.ii:1:15: error: constexpr function never produces a constant expression
[-Winvalid-constexpr]
This might be a duplicate of 36054.
--
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/20180210/5fdf6d5f/attachment.html>
More information about the llvm-bugs
mailing list