[fpc-pascal] Virtual inline methods

Vincent Snijders vincent.snijders at gmail.com
Thu Aug 18 17:16:56 CEST 2011


2011/8/18  <dhkblaszyk at zeelandnet.nl>:
>
> I'm porting a piece of code from C++ and there they use virtual inline
> methods. I tried it in FPC but it accepts either virtual OR inline methods.
> Is this a bug, or a feature that I don't understand enough about?

At first I didn't understand how a virtual function can be inlined (in
C++), but after reading
http://msdn.microsoft.com/en-us/magazine/cc301407.aspx I understand.

I think fpc is not optimizing so much that it can detect when a
virtual function can be inlined. But maybe WPO
(http://wiki.freepascal.org/Whole_Program_Optimization) can do
something similar.

Vincent



More information about the fpc-pascal mailing list