[fpc-devel] [Suggestion] Disable "inline" on -O1 and -O-.
J. Gareth Moreton
gareth at moreton-family.com
Tue Feb 12 05:18:34 CET 2019
I would like to make a suggestion that when compiling on a debug build,
which is usually -O1 and below, that procedures marked as "inline" are not
inlined and instead treated as regular subroutines. The reason why I
suggest this is that "inline" makes it very difficult to debug the actual
procedure, since you can't step into it or put breakpoints on lines inside
said routine. More often than not, I find myself commenting out the
"inline" directive when I need to debug it, which is a little silly and is
asking to accidentally leave it commented out.
I realise that the -O flags are for optimisation and "inline" is more of a
feature, but considering -O2 and -O3 are usually only selected when
compiling a release build, it's a little more convenient than having a
separate flag or option buried in a configuration dialog or the command
line.
Gareth aka. Kit
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-devel/attachments/20190212/bef334c8/attachment.html>
More information about the fpc-devel
mailing list