[Bug] Compiler error when accessing packed array element
7 Jul
2003
7 Jul
'03
2:30 a.m.
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
8448
Age (days ago)
8448
Last active (days ago)
2 comments
2 participants
participants (2)
-
Frank Heckenbach -
J. David Bryan