[Webkit-unassigned] [Bug 134252] New: check-webkit-style should warn about signed values in bit fields
bugzilla-daemon at webkit.org
bugzilla-daemon at webkit.org
Tue Jun 24 09:35:46 PDT 2014
https://bugs.webkit.org/show_bug.cgi?id=134252
Summary: check-webkit-style should warn about signed values in
bit fields
Product: WebKit
Version: 528+ (Nightly build)
Platform: Unspecified
OS/Version: Unspecified
Status: NEW
Severity: Normal
Priority: P2
Component: Tools / Tests
AssignedTo: webkit-unassigned at lists.webkit.org
ReportedBy: bfulgham at webkit.org
MSVC backs its enumerated types as signed values. This causes problems when enums are used as elements in a bit field, because MSVC wants to include a sign bit in the encoding. This means we loose one bit of resolution, often causing incorrect behavior. See Bug 134237 for some details on this problem.
Because of this, 'check-webkit-style' should warn when a developer attempts to insert an enum or other potentially signed value in a bit field.
Should be rejected:
SendCallbackPolicy sendLoadCallbacks : 1;
ContentSniffingPolicy sniffContent : 1;
DataBufferingPolicy dataBufferingPolicy : 1;
Should be allowed:
unsigned sendLoadCallbacks : 1;
bool sniffContent : 1;
unsigned dataBufferingPolicy : 1;
--
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
More information about the webkit-unassigned
mailing list