This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Wrong warning? ISO C restric ts enumerator values to range of âintâ


On 2008-02-06 14:59:21 -0000, Dave Korn wrote:
>   So, how about
> 
>  typedef enum OMX_ERRORTYPE
>  {
>    OMX_ErrorNone = 0,
>    OMX_ErrorInsufficientResources = (int)0x80001000
>  } OMX_ERRORTYPE;
> 
> ?

You should get a warning in the cases where 0x80001000 isn't
representable in an int because it is an implementation-defined
behavior. Is there any reason why gcc doesn't issue one?

-- 
Vincent Lefèvre <vincent@vinc17.org> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]