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

            Bug ID: 16609
           Summary: Expressions which result in bitfields are not properly
                    promoted
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: C++
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected]
    Classification: Unclassified

Created attachment 10876
  --> http://llvm.org/bugs/attachment.cgi?id=10876&action=edit
Code sample which should print 'signed' but prints 'unsigned'

While the direct addition of a bitfield and a signed integer correctly results
in a signed integer, an expression which yields a bitfield, as the conditional
operator is defined to if its operands are bitfields, has an extraneous
LValueToRValue conversion in the AST and casts the unsigned bitfield result to
an unsigned int before addition, resulting in an unsigned int instead of the
signed int expected by bitfield promotion rules.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to