[LLVMbugs] [Bug 4493] New: Add command-line option to specify signedness of 'int' bit-fields.

bugzilla-daemon at cs.uiuc.edu bugzilla-daemon at cs.uiuc.edu
Thu Jul 2 03:59:46 PDT 2009


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

           Summary: Add command-line option to specify signedness of 'int'
                    bit-fields.
           Product: clang
           Version: unspecified
          Platform: PC
        OS/Version: Linux
            Status: NEW
          Severity: enhancement
          Priority: P2
         Component: Basic
        AssignedTo: unassignedclangbugs at nondot.org
        ReportedBy: zaffanella at cs.unipr.it
                CC: llvmbugs at cs.uiuc.edu


According to the C99 standard (6.7.2p5):
"[...] it is implementation-defined whether the specifier 'int' designates the
same type as 'signed int' or the same type as 'unsigned int'."

Similarly, in the C89 standard it is said:
"Each of the above comma-separated lists designates the same type,
except that for bit-field declarations, signed int (or signed ) may
differ from int (or no type specifiers)."

clang seems to be missing a language/target option to specify this
implementation-defined behavior.

This should be added and exposed by supporting the GNU -fsignedbitfields
-funsigned-bitfields command-line options.


-- 
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