Article View: gnu.gcc.bug
Article #1169Re: 2.2.2 constant expression range checking
From: Paul Eggert
Date: Wed, 07 Oct 1992 18:40
Date: Wed, 07 Oct 1992 18:40
9 lines
861 bytes
861 bytes
>static u_char badmap[] = {
> '\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207',
>};
>gcc-test.c:8: warning: constant expression out of range for unsigned type
The warning is correct, since '\200' equals -128, and -128 is out of
range for the type unsigned char. You can fix the problem by writing
0200 instead of '\200'.
Technical Details
Message-ID:
<9210071840.AA29725@farside.twinsun.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!ames!agate!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!twinsun.COM!eggertReferences:
<9210071616.aa22653@s.s.ms.uky.edu>Show Full Headers
Complete Article Headers
Newsgroups: gnu.gcc.bug Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!ames!agate!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!twinsun.COM!eggert From: eggert@twinsun.COM (Paul Eggert) Subject: Re: 2.2.2 constant expression range checking Message-ID: <9210071840.AA29725@farside.twinsun.com> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet References: <9210071616.aa22653@s.s.ms.uky.edu> Distribution: gnu Date: Wed, 7 Oct 1992 18:40:53 GMT Approved: bug-gcc@prep.ai.mit.edu Lines: 10