I imagine a bitfield which does not specify 'signed' or 'unsigned'
will often be a bug in user code - maybe the programmer did not
know or did not remember that 'int i:3;' can be unsigned.

I suggest a warning for that in user code.  Maybe included in
-Wextra, but I cannot guess how much such correct code is around.

The warning should be quiet about system headers, which may know
how the system compiler treats such bitfields.


-- 
           Summary: Suggestion: -Wsignless-bitfields
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: h dot b dot furuseth at usit dot uio dot no


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=40530

Reply via email to