[fpc-pascal] Bug in FPC 3.0.0 (was: Bug in FPC 3.0.0?)

Jonas Maebe jonas.maebe at elis.ugent.be
Tue Feb 23 14:50:40 CET 2016


Henry Vermaak wrote on Tue, 23 Feb 2016:

> On Tue, Feb 23, 2016 at 02:13:52PM +0100, Jonas Maebe wrote:
>> It would probably be useful if we added support to the compiler to
>> generate a warning (or even error) in case a with statement hides an
>> existing symbol in scope though.
>
> Yes, please.  Something like -Wshadow would be very useful.

That already exists and is enabled by default for local variables and  
parameter names hiding fields. It even gives errors in FPC and ObjFPC  
modes, rather than warnings. It's just not (yet) implemented for  
with-statements (and local variables or fields hiding global  
variables, but that's a different matter).


Jonas



More information about the fpc-pascal mailing list