[llvm-bugs] [Bug 39365] New: gnu address-of-label extension parsing has too-high precedence
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Oct 19 20:15:48 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=39365
Bug ID: 39365
Summary: gnu address-of-label extension parsing has too-high
precedence
Product: clang
Version: unspecified
Hardware: PC
OS: Windows NT
Status: NEW
Severity: enhancement
Priority: P
Component: Frontend
Assignee: unassignedclangbugs at nondot.org
Reporter: zturner at google.com
CC: llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk
5 - https://godbolt.org/z/_XH9G1
struct foo
{
unsigned short operator!=(const foo &)
{
return 1;
}
};
extern void* p1;
extern void* p2;
extern foo f;
void bar()
{
if (f != (foo()) && p1 == p2)
{
}
}
Removing the parentheses or removing the second conditional makes this work.
Since this doesn't make sense as an address-of-label, we should prioritize
parsing this as what it actually is, which is ((f != foo()) && (p1 == p2))
--
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/20181020/07f68f05/attachment.html>
More information about the llvm-bugs
mailing list