[LLVMbugs] [Bug 9425] New: 'implicit conversion' warning for impossible path

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Mar 8 06:59:42 PST 2011


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

           Summary: 'implicit conversion' warning for impossible path
           Product: clang
           Version: trunk
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: pageexec at freemail.hu
                CC: llvmbugs at cs.uiuc.edu
            Blocks: 4068


compiling linux/i386 with clang r127235 produces this warning:

arch/x86/include/asm/dma-mapping.h:96:51: warning: implicit conversion from
'unsigned long long' to 'unsigned long' changes value from 18446744073709551615
to 4294967295 [-Wconstant-conversion]
                dma_mask = (gfp & GFP_DMA) ? DMA_BIT_MASK(24) :
DMA_BIT_MASK(32);
                                                               
^~~~~~~~~~~~~~~~
In file included from arch/x86/kernel/setup.c:48:
In file included from include/linux/pci.h:1227:
In file included from arch/x86/include/asm/pci.h:111:
In file included from include/asm-generic/pci-dma-compat.h:7:
include/linux/dma-mapping.h:55:40: note: instantiated from:
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
                                     ~ ^~~~~

note this is the same expression that triggered another warning mentioned in
bug #9402 but this time it's the other branch of the conditional expression.

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list