Watch, Follow, &
Connect with Us
Public Report
Report From: Delphi-BCB/Compiler/Delphi/Errors - Warnings    [ Add a report in this area ]  
Report #:  125414   Status: Resolved
Different warnings for Win32 and Win64 compilers
Project:  Delphi Build #:  20.0.15596.9843
Version:    20.0 Submitted By:   Eugene Kotlyarov
Report Type:  Minor failure / Design problem Date Reported:  6/11/2014 10:08:08 AM
Severity:    Commonly encountered problem Last Updated: 12/1/2015 8:27:53 AM
Platform:    All versions Internal Tracking #:   51751
Resolution: Fixed (Resolution Comments) Resolved in Build: : None
Duplicate of:  None
Voting and Rating
Overall Rating: No Ratings Yet
0.00 out of 5
Total Votes: 21
Description
Following code generates hint
--------
Hint: H2077 Value assigned to 'testfunc' never used
--------
in dcc64 compiler (which is correct).

But if you remove first line then dcc32 starts showing warning
Warning:
--------
W1035 Return value of function 'testfunc' might be undefined
--------

which is not correct

Steps to Reproduce:
--------
program test;

function testfunc: boolean;
begin
{$IFDEF WIN64}
  Result := False;
{$ENDIF}
  while True do
  begin
    Result := True;
    break;
  end;
end;

begin
  TestFunc;
end.
--------
Workarounds
Add conditional defines
Attachment
test.dpr.zip
Comments

None

Server Response from: ETNACODE01