The following program:
program bug;
type r = packed record a : char; b : array [1..4] of char end;
var v : r; i : integer; c : char;
begin c := v.a; { line 13: succeeds } c := v.b [1]; { line 14: succeeds } c := v.b [i]; { line 15: fails } end.
...gives this improper compile-time error:
bug.pas: In main program: bug.pas:15: cannot take address of packed record field `b'
This is with gpc version 20030507, based on gcc-3.2.3 (mingw special 20030504-1), configured for i486-pc-mingw32. I also reproduced this with the Chief's gpc-20030507-gcc-3.2.3-i386-pc-mingw32.tar.gz.
-- Dave
J. David Bryan wrote:
The following program:
program bug;
type r = packed record a : char; b : array [1..4] of char end;
var v : r; i : integer; c : char;
begin c := v.a; { line 13: succeeds } c := v.b [1]; { line 14: succeeds } c := v.b [i]; { line 15: fails } end.
...gives this improper compile-time error:
bug.pas: In main program: bug.pas:15: cannot take address of packed record field `b'
This is with gpc version 20030507, based on gcc-3.2.3 (mingw special 20030504-1), configured for i486-pc-mingw32. I also reproduced this with the Chief's gpc-20030507-gcc-3.2.3-i386-pc-mingw32.tar.gz.
http://gnu-pascal.de/crystal/gpc/en/mail8737.html
Frank
On 7 Jul 2003 at 5:06, Frank Heckenbach wrote:
Ah, yes. Thanks.
-- Dave