[fpc-pascal] How to remove verbose compiler output

Graeme Geldenhuys mailinglists at geldenhuys.co.uk
Sun Apr 6 02:59:29 CEST 2014


Hi Tomas,

On 2014-04-05 23:39, Tomas Hajny wrote:
> file). This is just to check if the behaviour depends on the compiled
> sources in any way.

You were on to something. Using your simple unit as an example, all the
various -v options work perfectly.

That made me double check the code I'm compiling - then I found
something. When I searched through all the source code [the first time]
for the text '$HINTS ON', my searching tool accidentally had regex
support enabled, thus the $ symbol was interpreted differently, and
resulted in no files with such text found. Doing the search again, and
this time disabling regex support, it revealed that I had a few units
that used the $HINTS directive.

My usage of the $HINTS directive was to switch hints off for one or more
lines of code, then switch hints back on. An example of this would be
around the FillChar() call.

I checked the FPC 2.6.2 documentation about the $HINTS directive and it
doesn't say what hints get switched on. But from a quick
experimentation, it seems {$HINTS ON} is equivalent to -vewnhi (it
doesn't just restore the previous hint verbosity state, it overrides and
sets a new verbosity state). And knowing now that {$HINTS ON} takes
priority over everything else, it explains the reason why my command
line parameter for -v<whatever> or what was defined in fpc.cfg was
totally useless.

So there was no FPC bug after all, but maybe the documentation for
$HINTS could be extended in this regards - stating that it doesn't
restore the previous verbosity level, it sets a new one. It could be
helpful to other developers in future.

So in the end my only solution is to use -vm with a list of message
numbers I want to suppress.

Thanks to everybody that tried to help me - much appreciated.

Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/



More information about the fpc-pascal mailing list