This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: Pascal Strings -- WITHDRAWN
- To: gcc-patches at gcc dot gnu dot org
- Subject: PATCH: Pascal Strings -- WITHDRAWN
- From: Ziemowit Laski <zlaski at apple dot com>
- Date: Thu, 5 Jul 2001 16:49:12 -0700
On Thursday, July 5, 2001, at 02:31 , Joseph S. Myers wrote:
> The uses of (1 << CHAR_TYPE_SIZE) + 1 should I think be ... - 1. Also,
> this expression will overflow when CHAR_TYPE_SIZE is the same as the
> size
> of host int (e.g., cross from 32-bit system to C4X - and C4X is the only
> live target with non-8-bit chars in the FSF tree).
The "+ 1" part is correct; please check the surrounding logic.
Actually, now I realize that 255 as the length limit was right in the
first
place. Aside from avoiding the overflow problem described here, 255
ensures \
that Pascal strings are *portable*. Correct me if I'm wrong, but one
wouldn't
want to have 1000-char Pascal strings that compile fine on one platform
but
not on others.
At any rate, I'd like to withdraw the Pascal string patch submission;
these
shall remain local to Apple for now. I simply cannot justify spending
more
of my employer's time and money on this.
--Zem
--------------------------------------------------------------
Ziemowit Laski Apple Computer, Inc.
zlaski@apple.com 2 Infinite Loop, MS 302-4SN
+1.408.974.6229 Fax .1344 Cupertino, CA 95014-2085