Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Warning: assignment from incompatible pointer type Date: Thu, 22 Jun 2017 12:28:18 -0700 Organization: None to speak of Lines: 33 Message-ID: References: <8760fqbjrr.fsf@bsb.me.uk> <87o9ti9mlt.fsf@bsb.me.uk> <87k24489ep.fsf@bsb.me.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Injection-Info: mx02.eternal-september.org; posting-host="3324c342b57104a80756c80376e8c851"; logging-data="15533"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+lsrR149EsSp1mmhMAYiLy" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) Cancel-Lock: sha1:zyE8ElCge8VDvxxB/jMyZ6bQmxQ= sha1:Ox+0JKQfEnTTy72ZmAu664Q2jgw= Xref: csiph.com comp.lang.c:112847 Richard Heathfield writes: > On 22/06/17 19:41, David Brown wrote: >> On 22/06/17 19:26, bartc wrote: >>> On 22/06/2017 18:21, Keith Thompson wrote: > > > >>>> As you know, the signedness of plain char is implementation-defined. >>> >>> But IME it tends to be signed. >> >> On x86 it is usually signed. On other targets, it can be different. > > On IBM mainframe systems (eg MVS), it is often unsigned. (I /think/ it's > always unsigned on systems that use EBCDIC, but I don't know for sure, > so I'll stick to 'often' for now.) Assuming CHAR_BIT==8 (and I seriously doubt that an EBCDIC-based implementation would have CHAR_BIT>8), plain char has to be unsigned in an EBCDIC implementation. 6.2.5p3: "If a member of the basic execution character set is stored in a char object, its value is guaranteed to be nonnegative." Most members of the basic execution character set, including all the letters and digits, have EBCDIC codes exceeding 127. [...] -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"