Summary: | [WTF] Workaround gcc bug for unsigned bitfield related usual arithmetic conversions | ||||||
---|---|---|---|---|---|---|---|
Product: | WebKit | Reporter: | Joonghun Park <jh718.park> | ||||
Component: | Web Template Framework | Assignee: | Joonghun Park <jh718.park> | ||||
Status: | RESOLVED FIXED | ||||||
Severity: | Normal | CC: | benjamin, cdumez, cmarcelo, darin, ews-watchlist, webkit-bug-importer | ||||
Priority: | P2 | Keywords: | InRadar | ||||
Version: | WebKit Nightly Build | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Attachments: |
|
Description
Joonghun Park
2020-04-26 02:12:11 PDT
Created attachment 397614 [details]
Patch
Committed r260727: <https://trac.webkit.org/changeset/260727> All reviewed patches have been landed. Closing bug and clearing flags on attachment 397614 [details]. FYI, in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=94767, Jonathan Wakely left a comment for a c++ standard entry for this issue. http://eel.is/c++draft/conv.prom#5, and the statement of this link is as below. "A prvalue for an integral bit-field ([class.bit]) can be converted to a prvalue of type int if int can represent all the values of the bit-field; otherwise, it can be converted to unsigned int if unsigned int can represent all the values of the bit-field. If the bit-field is larger yet, no integral promotion applies to it. If the bit-field has an enumerated type, it is treated as any other value of that type for promotion purposes." So I think gcc's build warning, warning: comparison of integer expressions of different signedness: ‘unsigned int’ and ‘int’ [-Wsign-compare] was valid one and this patch could be a proper fix, not just a workaround. |