[fpc-devel] overloaded functions - order of resolving ?

Virgo Pärna virgo.parna at mail.ee
Mon Mar 21 07:55:03 CET 2022


On Fri, 18 Mar 2022 12:43:49 -0000 (UTC), Virgo Pärna via fpc-devel <fpc-devel at lists.freepascal.org> wrote:
>
> 	What are the values of aByte and aWord?
> 	I would suggest testing with aWord value greater then 255.  
>

	Did some testing myself. With fpc 3.2.0 with -O- byte version is
still used, if actual aWord value is greater, then maximum byte value. 
	And that is even then, when I modified Foo to actually use P2
(added len parameter to both versions). So it cannot be any
optimization, that P2 is not used. So, it looks like a compiler bug. 

-- 
Virgo Pärna 
virgo.parna at mail.ee



More information about the fpc-devel mailing list