View Issue Details

IDProjectCategoryView StatusLast Update
0035471FPCPackagespublic2019-04-30 09:37
ReporterKarl-Michael SchindlerAssigned ToMichael Van Canneyt 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
PlatformdarwinOSMac OS XOS Version10.5, 10.6
Product Version3.3.1Product Build41958 
Target VersionFixed in Version3.3.1 
Summary0035471: revision 41958 breaks building i8086-msdos target.
Descriptionafter revision 41958 building the i8086-msdos target breaks with this error message:

...
Compiling ./rtl-objpas/src/inc/dateutil.pp
dateutil.inc(2730,49) Error: Call by var for arg no. 2 has to match exactly: Got "SmallInt" expected "LongInt"
...
dateutil.inc(2874,71) Error: Call by var for arg no. 2 has to match exactly: Got "SmallInt" expected "LongInt"
dateutil.pp(2) Fatal: There were 32 errors compiling module, stopping
Fatal: Compilation aborted

Changing the declaration from integer to LongInt fixes the problem. Assumed background: Integer corresponds to SmallInt on 16bit cpus.
Steps To Reproducemake all OPT=-ap CPU_TARGET=i8086 OS_TARGET=msdos CROSSOPT="-Anasm"
Additional InformationI do not think it matters, but for the sake of completeness: The host system is macOS 10.14 and starting compiler is fpc 3.0.4 64-bit installed using fink.
TagsNo tags attached.
Fixed in Revision41961
FPCOldBugId
FPCTarget3.2.0
Attached Files
  • dateutil.patch (943 bytes)
    Index: packages/rtl-objpas/src/inc/dateutil.inc
    ===================================================================
    --- packages/rtl-objpas/src/inc/dateutil.inc	(revision 41960)
    +++ packages/rtl-objpas/src/inc/dateutil.inc	(working copy)
    @@ -2723,7 +2723,7 @@
     
     function TryISOStrToDate(const aString: string; out outDate: TDateTime): Boolean;
     var
    -  xYear, xMonth, xDay: Integer;
    +  xYear, xMonth, xDay: LongInt;
     begin
       case Length(aString) of
         8: Result :=
    @@ -2746,7 +2746,7 @@
     
     function TryISOStrToTime(const aString: string; Out outTime: TDateTime): Boolean;
     var
    -  xHour, xMinute, xSecond, xMillisecond, xLength: Integer;
    +  xHour, xMinute, xSecond, xMillisecond, xLength: LongInt;
     begin
       Result := True;
       xLength := Length(aString);
    @@ -2860,7 +2860,7 @@
     Function TryISOTZStrToTZOffset(TZ : String; Out TZOffset : Integer) : boolean;
     
     Var
    -  H,M : Integer;
    +  H,M : LongInt;
     
     begin
       Result:=(TZ='Z') or (TZ='');
    
    dateutil.patch (943 bytes)

Activities

Karl-Michael Schindler

2019-04-30 00:34

reporter  

dateutil.patch (943 bytes)
Index: packages/rtl-objpas/src/inc/dateutil.inc
===================================================================
--- packages/rtl-objpas/src/inc/dateutil.inc	(revision 41960)
+++ packages/rtl-objpas/src/inc/dateutil.inc	(working copy)
@@ -2723,7 +2723,7 @@
 
 function TryISOStrToDate(const aString: string; out outDate: TDateTime): Boolean;
 var
-  xYear, xMonth, xDay: Integer;
+  xYear, xMonth, xDay: LongInt;
 begin
   case Length(aString) of
     8: Result :=
@@ -2746,7 +2746,7 @@
 
 function TryISOStrToTime(const aString: string; Out outTime: TDateTime): Boolean;
 var
-  xHour, xMinute, xSecond, xMillisecond, xLength: Integer;
+  xHour, xMinute, xSecond, xMillisecond, xLength: LongInt;
 begin
   Result := True;
   xLength := Length(aString);
@@ -2860,7 +2860,7 @@
 Function TryISOTZStrToTZOffset(TZ : String; Out TZOffset : Integer) : boolean;
 
 Var
-  H,M : Integer;
+  H,M : LongInt;
 
 begin
   Result:=(TZ='Z') or (TZ='');
dateutil.patch (943 bytes)

Michael Van Canneyt

2019-04-30 07:55

administrator   ~0115910

Checked and applied patch, thank you very much!

Karl-Michael Schindler

2019-04-30 09:37

reporter   ~0115912

My pleasure to contribute.

Issue History

Date Modified Username Field Change
2019-04-30 00:34 Karl-Michael Schindler New Issue
2019-04-30 00:34 Karl-Michael Schindler File Added: dateutil.patch
2019-04-30 07:55 Michael Van Canneyt Assigned To => Michael Van Canneyt
2019-04-30 07:55 Michael Van Canneyt Status new => resolved
2019-04-30 07:55 Michael Van Canneyt Resolution open => fixed
2019-04-30 07:55 Michael Van Canneyt Fixed in Version => 3.3.1
2019-04-30 07:55 Michael Van Canneyt Fixed in Revision => 41961
2019-04-30 07:55 Michael Van Canneyt FPCTarget => 3.2.0
2019-04-30 07:55 Michael Van Canneyt Note Added: 0115910
2019-04-30 09:37 Karl-Michael Schindler Status resolved => closed
2019-04-30 09:37 Karl-Michael Schindler Note Added: 0115912