suppressing hints[Re: [fpc-pascal] How to solve "variable does not seem to be initialized" compiler hint.]
Martin
lazarus at mfriebe.de
Fri Nov 20 01:07:19 CET 2009
Vinzent Höfler wrote:
> Rainer Stratmann <RainerStratmann at t-online.de>:
>
>
>> Am Thursday 19 November 2009 23:16:26 schrieb Vinzent Höfler:
>>
>>> {$HINTS OFF}
>>>
>>> ... code ...
>>>
>>> {$HINTS DEFAULT}
>>>
>>> maybe? Whereas DEFAULT restores the switch to the original state.
>>>
>> But then you have to do it everywhere in the code instead of one time.
>>
>
> Yes, that was the point. I want to disable only those hints which are proven to be bogus. Disabling the globally can be done easier with the message suppressing feature of the upcoming FPC release.
>
So then the question is, if those macros will work (could be defined in
an include file):
{$DEFINE HintOff = {$PUSH}{$HINT OFF} }
{$DEFINE HintDef = {$POP}}
HintOff
a:= b_is_not_initialized;
HintDef
More information about the fpc-pascal
mailing list