View Issue Details

IDProjectCategoryView StatusLast Update
0002664JEDI Code LibraryJclWideFormatpublic2005-02-21 12:00
ReporterrkennedyAssigned ToRobert Rossmair 
PrioritynormalSeverityminorReproducibilityalways
Status resolvedResolutionfixed 
PlatformDelphi 2005OSOS Version
Product Version 
Target VersionFixed in VersionVersion 1.95 
Summary0002664: Internal error C6662 when compiling
DescriptionJens Fudickar reported in jedi.jcl that JclWideFormat won't compile in Delphi 2005 because of an internal error. This submission should fix that error.
Steps To ReproduceThe problem, apparently, is in WideFormat's nested procedure, EnsureResultLen. Redefine it to take a "var" parameter for ResultLen, and move it above all the var and const declarations, so the WideFormat function starts out like this:

function WideFormat(const Format: WideString; const Args: array of const): WideString;
    procedure EnsureResultLen(const NeededLen: Cardinal; var AResultLen: Cardinal);
    begin
      if NeededLen > AResultLen then
      begin
        repeat
          AResultLen := AResultLen * 2;
        until NeededLen <= AResultLen;
        SetLength(Result, AResultLen);
      end;
    end;

That procedure gets called in two places. Ammend them to take ResultLen as their second parameter. Those changes resolve the internal error, but trigger a bogus compiler warning in its place. To fix the warning, initialize the Wide parameter with the other variable initializations, as follows:

  // Avoid compiler warnings
  LeftAlign := False;
  AnsiCount := 0;
  FormatStart := 0;
  Wide := False;
TagsNo tags attached.
Fixed in GIT commit
Fixed in SVN revision
IDE version

Relationships

has duplicate 0002662 resolvedRobert Rossmair Installation 

Activities

2005-02-21 11:15

 

JclWideFormat.pas (35,404 bytes)

Robert Rossmair

2005-02-21 12:00

developer   ~0006541

Problem with BCB6 (internal error DBG1384) still present.

Issue History

Date Modified Username Field Change
2005-02-20 13:12 rkennedy New Issue
2005-02-21 11:15 rkennedy File Added: JclWideFormat.pas
2005-02-21 12:00 Robert Rossmair Status new => resolved
2005-02-21 12:00 Robert Rossmair Fixed in Version => Version 1.95
2005-02-21 12:00 Robert Rossmair Resolution open => fixed
2005-02-21 12:00 Robert Rossmair Assigned To => Robert Rossmair
2005-02-21 12:00 Robert Rossmair Note Added: 0006541
2005-02-21 12:01 Robert Rossmair Relationship added related to 0002662
2005-02-21 12:02 Robert Rossmair Relationship replaced has duplicate 0002662