Re: [fpc-devel] Scalar value is accepted as an argument for an open array parameter

2012-06-08 Thread Alexander Klenin
On Fri, Jun 8, 2012 at 7:22 PM, Sven Barth wrote: >> I suggest this "feature" to be disabled in objfpc mode then. >> > > This would not be backwards compatible, thus the answer to this request is > most likely: No. On the other hand, FPC has an established history of breaking backwards compatibil

Re: [fpc-devel] Scalar value is accepted as an argument for an open array parameter

2012-06-08 Thread Sven Barth
Am 08.06.2012 09:37, schrieb Alexander Klenin: On Fri, Jun 8, 2012 at 6:08 PM, Marc Weustink wrote: Unfortunately Delphi (6) accepts this too. It took me some time at work to figure out why some code suddenly behaved weird. (I changed a integer argument to array of integer and assumed the compi

Re: [fpc-devel] Scalar value is accepted as an argument for an open array parameter

2012-06-08 Thread Alexander Klenin
On Fri, Jun 8, 2012 at 6:08 PM, Marc Weustink wrote: > Unfortunately Delphi (6) accepts this too. It took me some time at work to > figure out why some code suddenly behaved weird. (I changed a integer > argument to array of integer and assumed the compiler would help me to find > the places where

Re: [fpc-devel] Scalar value is accepted as an argument for an open array parameter

2012-06-08 Thread Marc Weustink
On 8-6-2012 8:18, Alexander Klenin wrote: The following code compiles both with : procedure F(const A: array of ShortInt); begin end; begin F(1); end. I think this is a bug in FPC, but if not -- it should be documented here: http://freepascal.org/docs-html/ref/refsu59.html#x157-16700014.4.5 I

Re: [fpc-devel] Scalar value is accepted as an argument for an open array parameter

2012-06-07 Thread Sven Barth
Am 08.06.2012 08:18, schrieb Alexander Klenin: The following code compiles both with : procedure F(const A: array of ShortInt); begin end; begin F(1); end. I think this is a bug in FPC, but if not -- it should be documented here: http://freepascal.org/docs-html/ref/refsu59.html#x157-16700014.4.

[fpc-devel] Scalar value is accepted as an argument for an open array parameter

2012-06-07 Thread Alexander Klenin
The following code compiles both with : procedure F(const A: array of ShortInt); begin end; begin F(1); end. I think this is a bug in FPC, but if not -- it should be documented here: http://freepascal.org/docs-html/ref/refsu59.html#x157-16700014.4.5 I am willing to file an issue one way or anoth