Switching off extended syntax disallow assignment of dynamic arrays variables
Original Reporter info from Mantis: yannick_duchene@yahoo.fr
-
Reporter name: Yannick Duchêne
Original Reporter info from Mantis: yannick_duchene@yahoo.fr
- Reporter name: Yannick Duchêne
Description:
Under FPC 2.2.0, the following code does not compile :
{EXTENDEDSYNTAX-}
PROCEDURE Test;
TYPE T = ARRAY OF Char;
VAR V : T;
BEGIN V := V;
END;
The compiler raise an "illegal expression" on "V := V;".
The code compiles normally as soon as one swith extended syntax on.
This is a bug, beceause extended syntax does not have anything to deal with dynamic arrays assignments. A personal comments : all my codes disable the extended syntax, beceause I consider it to be a nonsense (so I do not like the compiler default behaviour), and all my codes which did compile normally under FPC 2.0, now did not compile any more under FPC 2.2.0.
This may be due to the implementation of dynamic arrays assignment in FPC 2.2.0, which may internally represent it using function which may be called has procedure ? But I did not see how a such implementation could exist.
Well, here is what I could know about this bug.
Many thanks to the FPC team :)
Mantis conversion info:
- Mantis ID: 9918
- Version: 2.2.0
- Fixed in version: 2.2.2
- Fixed in revision: 8822 (#4291f1fa)