On 06/02/2008, Dave Korn <[EMAIL PROTECTED]> wrote:
> On 06 February 2008 11:05, Felipe Contreras wrote:
>
> > So, shouldn't gcc allow this without warnings then?
> >
> > typedef enum OMX_ERRORTYPE
> > {
> >   OMX_ErrorNone = 0,
> >   OMX_ErrorInsufficientResources = 0x80001000
> > } OMX_ERRORTYPE;
> >

OK. I see, you used "-pedantic" and the warning is:
felipe.c:5: warning: ISO C restricts enumerator values to range of 'int'

which is generated by c-decl.c (build_enumerator):

  if (pedantic && !int_fits_type_p (value, integer_type_node))
    {
      pedwarn ("ISO C restricts enumerator values to range of %<int%>");
      /* XXX This causes -pedantic to change the meaning of the program.
         Remove?  -zw 2004-03-15  */
      value = convert (integer_type_node, value);
    }

Cheers,

Manuel.

Reply via email to