PATCH: Pascal Strings -- WITHDRAWN

Ziemowit Laski zlaski@apple.com
Tue Jul 17 18:16:00 GMT 2001


(Sorry for the long silence -- I managed to succumb to chickenpox.)

On Thursday, July 5, 2001, at 06:33 , Geoff Keating wrote:

>> Zem> Actually, now I realize that 255 as the length limit was right in
>> Zem> the first place.  Aside from avoiding the overflow problem
>> Zem> described here, 255 ensures \ that Pascal strings are
>> Zem> *portable*. Correct me if I'm wrong, but one wouldn't want to
>> Zem> have 1000-char Pascal strings that compile fine on one platform
>> Zem> but not on others.
>
> Why not?  Even
>
> char x[100000];
>
> doesn't compile on all platforms.

True, but at least it is due to addressing limitations of the machine
(I assume you have the venerable 8088 in mind...), and *not* unnecessary
generality on the part of the language designer.

The Pascal string extension was proposed to make gcc3 handle legacy code,
*all of which* exists on platforms where a byte is 8 bits and hence the
maximum length is 255.  Permitting other max lengths, while possible,
would IMHO constitute unnecessary generality, because it would commit
us to support a feature (i.e., full utilization of the length byte,
regardless of its size) that no one really needs.

My $0.02 (or 0,02 $, depending on locale)...

--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



More information about the Gcc-patches mailing list