Article View: comp.bugs.4bsd
Article #4414.3bsd Pascal compiler bug
From: Kim Walden
Date: Wed, 03 Dec 1986 12:32
Date: Wed, 03 Dec 1986 12:32
47 lines
1942 bytes
1942 bytes
The following simple schoolbook example compiles and runs
with no problems using 'pc' on 4.2bsd, but when I try it on 4.3bsd,
pc -l foo.p
gives the following result:
-------------------------------------------------------------------
Berkeley Pascal PC -- Version 3.1 (9/7/85)
Tue Dec 2 13:26 1986 foo.p
1 program FOO(input,output);
3 type colour = (black,white);
4 var conv: array[colour] of array[1..5] of char;
6 begin
7 conv[black] := 'white';
8 conv[white] := 'black';
9 writeln('conv[black] is ', conv[black]);
10 writeln('conv[white] is ', conv[white]);
11 end.
E 7 - Too few subscripts (1 given, 2 required)
E 8 - Type clash: scalar is incompatible with integer
... Array index type incompatible with declared index type
... Error occurred on index number 2
... Error occurred on qualification of conv
E 10 - Too few subscripts (1 given, 2 required)
In program FOO:
w - variable conv is used but never set
-------------------------------------------------------------------
Seems to be a bug here -- has anybody seen it before?
It has the unfortunate consequence that I cannot compile the WICOMO
implementation of Barry Boehms COCOMO cost estimation model anymore.
Strange that it should have passed unnoticed, since this type of
construction must be fairly common.
Kim Walden, ENEA DATA Sweden
UUCP: {seismo,mcvax}!enea!kim
ARPA: kim%enea.uucp@seismo.CSS.GOV
Technical Details
Message-ID:
<1546@enea.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!seismo!mcvax!enea!kimShow Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!mnetor!seismo!mcvax!enea!kim From: kim@enea.UUCP (Kim Walden) Newsgroups: comp.bugs.4bsd Subject: 4.3bsd Pascal compiler bug Message-ID: <1546@enea.UUCP> Date: Wed, 3-Dec-86 07:32:50 EST Article-I.D.: enea.1546 Posted: Wed Dec 3 07:32:50 1986 Date-Received: Fri, 5-Dec-86 03:20:21 EST Reply-To: kim@enea.UUCP (Kim Walden) Organization: Enea Data, Sweden Lines: 46