[LLVMbugs] [Bug 24283] New: false negative for -Wshift-overflow

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Mon Jul 27 13:22:57 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=24283

            Bug ID: 24283
           Summary: false negative for -Wshift-overflow
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: Frontend
          Assignee: unassignedclangbugs at nondot.org
          Reporter: davide at freebsd.org
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

See r243241 for reference.
http://llvm.org/viewvc/llvm-project?view=revision&revision=243241

% cat shift.c
#include <sys/types.h>

static const uint32_t kFlagSync  = 2 << 30;
static const uint32_t kFlagSync2 = 1 << 35;

% ./clang shift.c -Wshift-overflow
shift.c:4:38: warning: shift count >= width of type [-Wshift-count-overflow]
static const uint32_t kFlagSync2 = 1 << 35;

-- 
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/20150727/15da6e56/attachment.html>


More information about the llvm-bugs mailing list