[LLVMbugs] [Bug 19442] New: warning: implicit conversion changes signedness: 'long' to 'int'

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Apr 16 03:39:17 PDT 2014


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

            Bug ID: 19442
           Summary: warning: implicit conversion changes signedness:
                    'long' to 'int'
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: magnus.reftel at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

Created attachment 12381
  --> http://llvm.org/bugs/attachment.cgi?id=12381&action=edit
Testcase

The below small testcase causes -Wsign-conversion to print a (to me)
nonsensical warning message: "warning: implicit conversion changes signedness:
'long' to 'int'".

void f(void)
{
    unsigned int mask = 1;
    long value = 1;
    int result = value & mask;
}

The warning is correct in that there is an implicit sign conversion going on,
but it's not between (signed) long and (signed) int, like the warning message
says.

This message has been the same since at least 3.0.

-- 
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/20140416/e3004b5e/attachment.html>


More information about the llvm-bugs mailing list