[llvm-bugs] [Bug 43052] New: -Wsequence-point misses some cases; also produces false positives for C++17
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Aug 19 12:13:16 PDT 2019
https://bugs.llvm.org/show_bug.cgi?id=43052
Bug ID: 43052
Summary: -Wsequence-point misses some cases; also produces
false positives for C++17
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C++17
Assignee: unassignedclangbugs at nondot.org
Reporter: david.bolvansky at gmail.com
CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk
bool g();
enum r { no , yes};
r test(r res) {
res = (res == no) ? yes : res = no;
bool t = t = g();
return res ;
}
This should warn. GCC catches it, Clang not.
-std=c++17
int r(int a) {
return a++ << a++;
}
This one is defined with C++17. Expression E1 is sequenced before the
expression E2, but Clang produces incorrect warnings.
--
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/20190819/34122384/attachment.html>
More information about the llvm-bugs
mailing list