On 28 Feb 2005 at 12:11, Adriaan van Os wrote:
An Internal compiler error has been reported on the macpascal mailing list, as reproduced by the following program:
[G5:gcc/p/test] adriaan% cat avo10.pas program avo10; type UInt16 = cardinal attribute( size = 16); StyleItemGPC = (bold,italic,underline,outline,shadow,condense,extend); StyleParameter = UInt16; procedure TextFace(face: StyleParameter); external name 'TextFace'; begin TextFace( [bold, italic]); {internal compiler error} end.
[G5:gcc/p/test] adriaan% gpc avo10.pas ../../gcc-3.4.3/gcc/p/typecheck.c:123:incomplete_type_error: failed assertion `0' avo10.pas: In main program: avo10.pas:8: error: Internal compiler error.
I can reproduce this under Mingw. The program of course is buggy (wrong parameter passed to TextFace) but the compiler shouldn't crash.
By way of comparison, the Delphi error message here is: "D:\tmp\avo10.pas(6) Error: Declaration expected but ';' found D:\tmp\avo10.pas(9) Error: Incompatible types: 'Cardinal' and 'Set' D:\tmp\avo10.pas(10) Error: ';' expected but '.' found D:\tmp\avo10.pas(11) D:\tmp\avo10.pas(12) Error: Declaration expected but end of file found"
[...]
Adding a typecast triggers another error:
[...] Again, reproducible under Mingw. The Delphi error message here is: "D:\tmp\avo10.pas(6) Error: Declaration expected but ';' found D:\tmp\avo10.pas(9) Error: Invalid typecast D:\tmp\avo10.pas(10) Error: ';' expected but '.' found D:\tmp\avo10.pas(11) D:\tmp\avo10.pas(12) Error: Declaration expected but end of file found"
Best regards, The Chief -------- Prof. Abimbola A. Olowofoyeku (The African Chief) web: http://www.greatchief.plus.com/