RE: Wrong warning? ISO C restricts enumerator values to range of ‘int’

Dave Korn dave.korn@artimi.com
Wed Feb 6 11:11:00 GMT 2008


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;
> 
> Best regards.

  Does this work any better?

 typedef enum OMX_ERRORTYPE
 {
   OMX_ErrorNone = 0,
   OMX_ErrorInsufficientResources = 0x80001000u
 } OMX_ERRORTYPE;


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....



More information about the Gcc mailing list