[llvm-bugs] [Bug 41867] New: "note: member call on member 'endpoint' of union with active member 'interface' is not allowed in a constant expression" note should include the member name
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon May 13 15:16:34 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=41867
Bug ID: 41867
Summary: "note: member call on member 'endpoint' of union with
active member 'interface' is not allowed in a constant
expression" note should include the member name
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++
Assignee: unassignedclangbugs at nondot.org
Reporter: phosek at chromium.org
CC: blitzrakete at gmail.com, dgregor at apple.com,
erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
richard-llvm at metafoo.co.uk
With the tip-of-tree Clang, this is failing to compile because the
-Winvalid-constexpr has gotten more strict after r360499
(https://github.com/llvm/llvm-project/commit/d05df0ef4362855405ae1df76572909fb0ff55b2):
usb-mass-storage.cpp:30:37: error: constexpr function never produces a
constant expression [-Winvalid-constexpr]
static constexpr usb_descriptor Create(usb_endpoint_descriptor_t
descriptor) {
^
usb-mass-storage.cpp:32:25: note: member call on member 'endpoint' of union
with active member 'interface' is not allowed in a constant expression
retval.endpoint = descriptor;
^
1 error generated.
It would be useful if the note also included the name of the member which is
being called (in this case it's operator= but that's not completely obvious
from the message).
--
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/20190513/690942ad/attachment.html>
More information about the llvm-bugs
mailing list