Closed
Bug 895582
Opened 11 years ago
Closed 10 years ago
Get rid of MOZ_ENUM_TYPE
Categories
(Core :: MFBT, defect)
Core
MFBT
Tracking
()
RESOLVED
FIXED
mozilla38
People
(Reporter: emk, Assigned: emk)
References
Details
Attachments
(1 file)
(deleted),
patch
|
Waldo
:
review+
|
Details | Diff | Splinter Review |
Are we still supporting gcc 4.4? According to bug 894242 comment #9, it looks like that gcc 4.4 fails in the configure script.
If we don't support gcc 4.4 anymore, we can remove MOZ_ENUM_TYPES macro.
Comment 1•11 years ago
|
||
Yes, B2G builds still use gcc 4.4.
Assignee | ||
Comment 2•11 years ago
|
||
Ah, bug 770625 was only for linux b2g desktop builds. I see.
Assignee | ||
Comment 4•11 years ago
|
||
Actually gcc 4.4 supports typed enums. (See bug 952785.)
Comment 6•10 years ago
|
||
It won't be possible to remove this macro when the typed enum is used as the type of a bit-field for some time, due to a GCC bug. Even super-recent GCC warns when a typed enum is used as a bit-field type (either gunking up output or causing -Werror compile errors):
[jwalden@find-waldo-now tmp]$ cat t.cpp
enum E : char { x };
struct S
{
E field : 1;
};
int main()
{
S s;
s.field = x;
return s.field;
}
[jwalden@find-waldo-now tmp]$ g++49 -std=c++0x -ofoo t.cpp
t.cpp:5:13: warning: ‘S::field’ is too small to hold all values of ‘enum E’
E field : 1;
^
Better yet, the warning is enabled by default and can't be switched off by -Wno-foo or similar.
I ran into this while working on this rev:
https://hg.mozilla.org/integration/mozilla-inbound/rev/37314ece19fa
The bit-field case is unusual enough it probably prevents few, if any, MOZ_ENUM_TYPE uses from being converted (and probably shouldn't preclude changes -- just have this as the exceptional case, as in that rev). I guess other concerns of MOZ_ENUM_TYPE (of the kind encountered in bug 952785 and bug 1058561) are going to be more often pressing.
Summary: Get rid of MOZ_ENUM_TYPES → Get rid of MOZ_ENUM_TYPE
Assignee | ||
Comment 7•10 years ago
|
||
B2G ICS emulator builds no longer fail the tests:
https://treeherder.mozilla.org/#/jobs?repo=try&revision=417bb36e0bcb
https://treeherder.mozilla.org/#/jobs?repo=try&revision=92e97ca9f43d
Updated•10 years ago
|
Attachment #8550541 -
Flags: review?(jwalden+bmo) → review+
Assignee | ||
Comment 8•10 years ago
|
||
Flags: in-testsuite-
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla38
You need to log in
before you can comment on or make changes to this bug.
Description
•