v20z00@exunido.uucp (Paffrath) (01/27/89)
I have tried to reach borland twice, but until today I've received no reaction, so I have to bother the net with this stuff. While converting large projects to TP 5.0, I have discoverd two bugs which make life very hard. The first one concerns the new procedure-types. I use many procedure parameters to generate generic units. With TP4.0 I used the INLINE-Trick, but was struck many times by the fact that there was no type-checking. Now, when using TP 5.0 style, I get type mismatch errors at positions that are absolute correct. I have traced down this misbehavior to a small set of example-units which I include at the end of this posting. As you can see by this example the compiler isn't able to handle procedure- types in a usefull way. The second bug is harder to show, cause you need more than 40,000 lines to generate it. (I won't post an example!) When you have large projects like the one I work on, it is impossible to debug it, because you are forced to disable *any* debugging information, even stack and range check, to allow the linker to succed without an out of memory error. The project *is* split in overlays (even the input-routine is overlayed). The .EXE-file is only about 170 KB but when you want to include debugging information, or try to compile slightly larger programs the linker barcks at you. (The TD.EXE-Debugger also is unable to work with programs that have *large* symboltables) I need bug-fixes for the compiler, if possible for the debugger, and I need them real urgent. Many other people here in germany are also waiting, even the official german distributer "Heimsoeth", because they are struck by the same bugs. I have *no* possibility to reach compuserve, so please E-mail. When there is any interest, I will summarize for the net. I don't want to blame borland. I work with TC,TD,TASM and TP and all are very great products, but I want my source running and being debugged. ------------------------------------------------------------------------ Jan Neuhaus, Baroperstr. 335/140, 4600 Dortmund 50, WEST-GERMANY E-mail address UUCP: v20z00@exunido.uucp (...uunet!unido!exunido!v20z00) BITNET: v20z00@ddohinf6.bitnet ----------------------------TEST.PAS--------------------------------------- (* This is the main program *) program test; {$F+,D-,O-} uses tu0,tu1,tu2,tu3; var v1 : procedure(var x:inttyp; var y:wordtyp); v2 : db_walkproctyp; procedure pt1(var x:inttyp; var y:wordtyp); begin end; begin (* Perform some test of type-equality *) if @v1=@v2 then exit; v1 := pt1; DB_Test(pt1); v2 := pt1; end. ----------------------------TU0.PAS--------------------------------------- (* Introduce some Types *) {$A-,B-,D+,E-,F-,I-,L-,N-,O-,R+,S+,V-} UNIT Tu0; INTERFACE TYPE wordtyp = WORD; inttyp = RECORD (* It must be a record to generate the fault *) X : INTEGER; END; IMPLEMENTATION END. ----------------------------TU1.PAS--------------------------------------- (* This UNIT defines the uses procedure-type *) {$A+,B-,D+,E-,F-,I-,L-,N-,O-,R+,S+,V-} UNIT tu1; INTERFACE USES Crt, tu3, (* If you comment "tu3," out, the error in TU2 fanishes. No it isn't funny, it nearly killed me! *) tu0; TYPE DB_WalkProcTyp = PROCEDURE (VAR IdxF:inttyp; VAR ProcDatRef:wordtyp); procedure db_test(x:db_walkproctyp); IMPLEMENTATION procedure db_test(x:db_walkproctyp); begin end; END. ----------------------------TU2.PAS--------------------------------------- (* This UNIT uses the defined type, or better tries to uses it *) {$A+,B-,D+,E-,F-,I-,L+,N-,O+,R+,S+,V-} unit tu2; INTERFACE USES tu0, tu1; implementation {$F+} procedure n1(VAR IdxF:inttyp; VAR ProcDatRef:wordtyp); begin end; (* This header was actually copied, it is !exactly! the DB_WalkProcTyp *) {$F-} begin db_test(n1); (* <===== There the compiler says "type mismatch" *) end. ----------------------------TU3.PAS--------------------------------------- (* A completly empty UNIT *) {$A+,B-,D-,E-,F-,I-,L-,N-,O+,R-,S+,V-} UNIT tu3; INTERFACE IMPLEMENTATION END. ----------------------------END OF EXAMPLE-------------------------------- ------------------------------------------------------------------------ Jan Neuhaus, Baroperstr. 335/140, 4600 Dortmund 50, WEST-GERMANY E-mail address UUCP: v20z00@exunido.uucp (...uunet!unido!exunido!v20z00) BITNET: v20z00@ddohinf6.bitnet