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: unassignedclangb...@nondot.org
          Reporter: lebedev...@gmail.com
                CC: llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to