[ofa-general] [PATCH ibverbs] Do not use enum object types for bitfields

Roland Dreier rdreier at cisco.com
Wed Jul 29 23:12:05 PDT 2009


 > If I'm not mistaken, the ANSI/ISO C standard requires that enums have the
 > same size as an int.

The issue is that, although as you point out, the C standard requires
that enum members have type int, the actual enum type can have a
different size -- the specific quote is:

   Each enumerated type shall be compatible with an integer type. The
   choice of type is implementation-defined, but shall be capable of
   representing the values of all the members of the enumeration.

Do a web search for "fno-short-enums" to see how this actually affects
the ARM ABI.  Fortunately modern Linux ARM ABIs seem to use
-fno-short-enums so we're OK there.

 - R.



More information about the general mailing list