On 06/02/2008, Felipe Contreras <[EMAIL PROTECTED]> wrote: > On Feb 6, 2008 1:18 PM, Manuel López-Ibáñez <[EMAIL PROTECTED]> wrote: > > On 06/02/2008, Felipe Contreras <[EMAIL PROTECTED]> wrote: > > > > > > So, shouldn't gcc allow this without warnings then? > > > > > > typedef enum OMX_ERRORTYPE > > > { > > > OMX_ErrorNone = 0, > > > OMX_ErrorInsufficientResources = 0x80001000 > > > } OMX_ERRORTYPE; > > > > >
It seems that this is a correct warning. "Even though the underlying type of an enum is unspecified, the type of enumeration constants is explicitly defined as int (6.4.4.3/2 in the C99 Standard)." from: http://gcc.gnu.org/ml/gcc-patches/2000-07/msg00993.html Nonetheless, the comment from Zack is right, so shouldn't we make the conversion independently of the warning ? Cheers, Manuel.