The Delphi Bug List

Entry No.
580
Compiler
Problem with $E directive: it ignores $IFDEF directives
1.02 2.01 3.0 3.01 3.02 4.0 4.01 4.02 4.03 5.0 5.01 6.0 6.01 6.02 Kylix 1.0
N/AN/AAbsentAbsentAbsentAbsentAbsentAbsentAbsentExistsExistsExistsExistsExistsFixed
Description
Reported by Primoz Gabrijelcic; checked by Reinier Sterkenburg
To reproduce:
  • Start D5.
  • Create new console application.
  • Paste the following code:
    program ifdefbug;
    
    {$APPTYPE CONSOLE}
    
    {$IFDEF NOTDEF}
    {$E XXX}
    {$ENDIF}
    
    begin
    end.
  • Run. Delphi will compile the program (with extension .exe, as it should be) and then report "Could not find program, 'X:\somepath\ifdefbug.XXX'".
    Extremely stupid.
This, of course, works as it should in the D4 IDE. The problem lies in the two way integration between the source code and the IDE. Once the IDE 'sees' the {$E XXX} directive, it sets this value in Project-Options-Application-Target file extension. Setting that value back to an empty value results in a modification of the source file, a modification with an error in case there is an IFDEF.
Latest update of this entry: 2002-04-03

Post a comment on this bug


Index page
Delphi Bug List home page
The Delphi Bug Lists are presently maintained by Jordan Russell, who has taken over this task from Reinier Sterkenburg since August 2000.
All feedback is appreciated. See also the feedback section of the Delphi Bug List home page.