Bug 121189
Summary: | check-webkit-style complains about "int" bitfield types. | ||
---|---|---|---|
Product: | WebKit | Reporter: | Michael Saboff <msaboff> |
Component: | Tools / Tests | Assignee: | Nobody <webkit-unassigned> |
Status: | ASSIGNED | ||
Severity: | Normal | CC: | andersca, ap |
Priority: | P2 | ||
Version: | 528+ (Nightly build) | ||
Hardware: | All | ||
OS: | All |
Michael Saboff
in Tools/Scripts/webkitpy/style/checkers/cpp.py around line 3110, we check to see whether a bitfield is declared with signed, unsigned or bool. The check is done by looking for all the other types.
# Check for plain bitfields declared without either "singed" or "unsigned".
# Most compilers treat such bitfields as signed, but there are still compilers like
# RVCT 4.0 that use unsigned by default.
matched = re.match(r'\s*((const|mutable)\s+)?(char|(short(\s+int)?)|int|long(\s+(long|int))?)\s+[a-zA-Z_][a-zA-Z0-9_]*\s*:\s*\d+\s*;', line)
It seems a little strange that short, int and long types are on the "bad" list as these are clearly signed values.
Attachments | ||
---|---|---|
Add attachment proposed patch, testcase, etc. |
Alexey Proskuryakov
It sounds like the comment before the check says that int is not necessarily signed when in bitfield.