This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH: Pascal Strings -- TAKE FOUR
- To: zlaski at apple dot com
- Subject: Re: PATCH: Pascal Strings -- TAKE FOUR
- From: Geoff Keating <geoffk at geoffk dot org>
- Date: Tue, 3 Jul 2001 18:09:53 -0700
- CC: gcc-patches at gcc dot gnu dot org
- References: <200107032333.f63NXrw10326@scv2.apple.com>
- Reply-to: Geoff Keating <geoffk at redhat dot com>
> Date: Tue, 3 Jul 2001 16:33:53 -0700
> From: Ziemowit Laski <zlaski@apple.com>
> On Tuesday, July 3, 2001, at 04:34 , Geoff Keating wrote:
>
> > The explicit constant 255 is wrong, there are some platforms that GCC
> > supports where char is 16 bits. There are a number of places in your
> > patch where that needs fixing.
>
> Please advise on how I should encode that information -- I'm tempted to
> say
>
> ((unsigned char)-1)
No, that won't work either, that will give the size of 'unsigned char'
on the machine GCC is being hosted on, not on the target.
> but perhaps there's some macro somewhere in the bowels of gcc that's
> more suitable?
You want CHAR_TYPE_SIZE, which is the number of bits in a 'char' for
the target.
--
- Geoffrey Keating <geoffk@geoffk.org>