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: unassignedclangb...@nondot.org
          Reporter: we...@wsoptics.de
                CC: llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to