[fpc-devel] Promote specific warning into error
Michael Van Canneyt
michael at freepascal.org
Fri Sep 24 14:41:34 CEST 2021
On Fri, 24 Sep 2021, Marc Weustink via fpc-devel wrote:
> On 24-9-2021 14:24, Marc Weustink via fpc-devel wrote:
>> Hi,
>>
>> Is there a way to promote a specific warning(4056) into an error ?
>
> from the commandline I mean. I've found {$warn 4056 error} but I don't
> want to put this in all sources
The command-line only allows to set this for all warnings/hints/notes.
-Se<x> Error options. <x> is a combination of the following:
<n> : Compiler halts after the <n> errors (default is 1)
h : Compiler also halts after hints
n : Compiler also halts after notes
w : Compiler also halts after warnings
I didn't see a way to do this for specific message numbers.
I think at this point your best bet is to create a small include file that is included in all files ?
Michael.
More information about the fpc-devel
mailing list