On 12/17/2014 08:31 AM, Nathan Froyd wrote:
> It's worth noting that enums with explicit types don't work in all cases
> with our current B2G compiler, see bug 1058561.

Also gcc will wrongly warn (and you can't turn off the warning, even in -Werror 
builds) if you use |enum Foo : T| as the type of a bit-field.  See 
<https://gcc.gnu.org/bugzilla/show_bug.cgi?id=51242>.  The 
JS_ENUM_HEADER/JS_ENUM_FOOTER uses in js/public/Value.h derive from this bug.

Other than these two issues (one clear and easily observed, one that seems 
B2G-only), |enum Foo : T| is fair game to use.  We have at least one fully 
unguarded use of this in js/src/vm/Shape.h for the js::Shape::SlotInfo enum, 
and the sky hasn't fallen yet.  :-)

Jeff
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to