[LLVMbugs] [Bug 16467] New: no warning on undefined behaviour

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Jun 26 13:57:07 PDT 2013


http://llvm.org/bugs/show_bug.cgi?id=16467

            Bug ID: 16467
           Summary: no warning on undefined behaviour
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: rdivacky at freebsd.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

liska ~$ cat hello.c
int main(int argc, char **argv)
{
  int i = 7;

  return i = ++ i;
}
liska ~$ gcc49 -Wall hello.c
hello.c: In function 'main':
hello.c:5:12: warning: operation on 'i' may be undefined [-Wsequence-point]
   return i = ++ i;
            ^
liska ~$ clang-3.4 -Wall hello.c
*silence*

-- 
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/20130626/cdc75922/attachment.html>


More information about the llvm-bugs mailing list