Watch, Follow, &
Connect with Us

Please visit our new home

Public Report
Report From: Delphi Prism/Compiler    [ Add a report in this area ]  
Report #:  88950   Status: Open
Malformed conditional directive causes endless error messages
Project:  Embarcadero Prism Build #:
Version:    1.1 Submitted By:   Robert Ogren
Report Type:  Basic functionality failure Date Reported:  10/14/2010 1:23:20 AM
Severity:    Infrequently encountered problem Last Updated: 3/20/2012 2:24:39 AM
Platform:    All platforms Internal Tracking #:   280871
Resolution: None (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: None
Certain malformed conditional directives cause endless error messages from the compiler. The Visual Studio 2010 Shell environment becomes unresponsive long enough that you have to terminate it. If you run MSBuild.exe in a command prompt, it gives up after 5000 error messages.

Adding the following line to a class causes the problem (note that the curly bracket before $ENDIF iss missing)
    const strs: Array[0..1] of string ={$IFDEF CLR}[{$ELSE}($ENDIF}'A', 'B'];

The error message that keeps repeating is:
...\Program.pas(25,1,25,1): error PE24: "end" expected [...\CondDef.oxygene]
...\Program.pas(25,1,25,1): error PE24: "end" expected [...\CondDef.oxygene]
...\Program.pas(25,1,25,1): error PE24: "end" expected [...\CondDef.oxygene]

This has happened to me a few times when adapting code to be able to compile it in both Delphi/win32 and Delphi Prism, but probably does not happen often during normal programming.
Steps to Reproduce:
Create a new console application and add the following line to the public section of the class, or open the attached sample application.

    const strs: Array[0..1] of string ={$IFDEF CLR}[{$ELSE}($ENDIF}'A', 'B'];

Try to build the application. I expect one error message, not an unresponsive IDE due to 5000 error messages.


Server Response from: ETNACODE01