Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2002-01

Bug?: Local compiler directives not local

2 messages · 2 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Marcel van der Heide

According to the fpc Programmers guide, local directives are restored to the default at the end of a unit or program.
I've found that this doesn't happen.

When in the appended source notes and hints are turned off for the unit, no notes and hints are generated for the main program either, when asking the compiler for hints and notes.

Compiler version: snapshot of 1.05, date: 2002/01/16

Is this as planned or is this indeed a bug?

Best wishes,

Marcel

-----
{$NOTES OFF}
{$HINTS OFF}
unit cdtest2;
interface
procedure test;
implementation
procedure test;
var
  K: Byte;
begin
end;
end.
-----
program cdtest1;
uses
  cdtest2;
var
  J: Byte;
begin
end.
-----

Reply by email

Peter Vreman
Show quoted text 11 lines
According to the fpc Programmers guide, local directives are restored to the default at the end of a unit or program. I've found that this doesn't happen. When in the appended source notes and hints are turned off for the unit, no notes and hints are generated for the main program either, when asking the compiler for hints and notes. Compiler version: snapshot of 1.05, date: 2002/01/16 Is this as planned or is this indeed a bug?

It is a bug.

Reply by email