[llvm-bugs] [Bug 32470] New: Add a warning about sequence points
via llvm-bugs
llvm-bugs at lists.llvm.org
Thu Mar 30 07:04:38 PDT 2017
https://bugs.llvm.org/show_bug.cgi?id=32470
Bug ID: 32470
Summary: Add a warning about sequence points
Product: clang
Version: unspecified
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: lebedev.ri at gmail.com
CC: llvm-bugs at lists.llvm.org
Created attachment 18199
--> https://bugs.llvm.org/attachment.cgi?id=18199&action=edit
the testcase
Hi.
I have experienced an issue, when the same code would result in different
behavior with clang and gcc.
I was able to reduce the testcase.
The attached testcase was minimized.
With gcc (6), the exit code is 10.
With clang (tried with current svn version), the exit code is 0.
0 is the 'expected' answer.
As i was told in Debian Bug#859116, "This is unspecified, there are no sequence
points between the two."
Perhaps clang or clang-tidy can learn to warn about code like this?
--
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/20170330/e816d5e5/attachment-0001.html>
More information about the llvm-bugs
mailing list