Thread View: net.lang.pascal
3 messages
3 total messages
Started by Peter Montgomery
Sat, 06 Aug 1983 02:02
No error message for missing "end" statement.
Author: Peter Montgomery
Date: Sat, 06 Aug 1983 02:02
Date: Sat, 06 Aug 1983 02:02
23 lines
1275 bytes
1275 bytes
{ When compiled using "pc -c", this yields no syntax errors. }
{ But when we try to link it with other procedures, "two" is undefined. }
{ Using "pc -S" or "nm" shows nothing written to the object file for "two". }
{ We use Berkeley Pascal PC -- Version 2.0 (Fri Jul 10 17:13:18 1981). }
procedure two; forward;
procedure one;
begin
two;
end { one };
procedure two;
begin
while 1 <= 0 do begin writeln(1); { begin without end };
end { two };
(*
Peter Montgomery
{bli,blix,bmcg,burdvax,cbosgd,csun,ihnss,hplabs,ihnp4,netvax,orstcs,
parallax,randvax,sdccsu3,slant45,sdcnet,sytek,trw-unix,ucla-s,
ucla-vax,hughes}!sdcrdcf!pmontgom
*)
Re: No error message for missing "end" statement.
Author: Shane
Date: Wed, 10 Aug 1983 15:13
Date: Wed, 10 Aug 1983 15:13
14 lines
1355 bytes
1355 bytes
At UCSD, we use Berkeley Pascal in some of our upper-division EECS courses. This bug quickly bared its teeth when students in a compiler writing course started using seperate compilation of BPascal routines. Of course, since the compiler doesn't generate a diagnostic, it is frustrating to find, at the end of a big make, that you have to go back and remake the whole thing. (Worse, the bug was usually not identified correctly by many students). Anyway, best way to get a diagnostic seems to be to just insert an extraneous 'end' at the end of the file containing the routine which the linker says is undefined at ld time. Then you will get a diagnostic that should properly inform you of the missing end (which is now an improperly placed end). Shane ucbvax!sdcsvax!sdccsu3!zz1sm
Re: No error message for missing "end" statement.
Author: Stuart Friedberg
Date: Sun, 14 Aug 1983 03:53
Date: Sun, 14 Aug 1983 03:53
5 lines
946 bytes
946 bytes
I noted this problem several months ago, and between us we aren't the only ones to notice the problem. I have no idea why the compiler doesn't complain about the missing end. I did find out that some code is generated but the (crucial) external symbols needed to link the routines with others are not put into the .o file. Can somebody at Berkeley explain the problem?
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads