https://bugs.llvm.org/show_bug.cgi?id=41313
Bug ID: 41313
Summary: __builtin_assume(false) should not be a constant
expression
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: Frontend
Assignee: unassignedclangb...@nondot.org
Reporter: da...@doublewise.net
CC: llvm-bugs@lists.llvm.org, neeil...@live.com,
richard-l...@metafoo.co.uk
I would expect this static_assert to fail:
static_assert((void(__builtin_assume(false)), true));
I believe this change would fit into the constexpr model better. constexpr
evaluation is required to diagnose undefined behavior, and __builtin_assume
states that if the condition is false, the behavior is undefined.
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs