* * *

Author Topic: FPC 3.2.x series branched, trunk update to 3.3.1  (Read 10067 times)

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 6544
FPC 3.2.x series branched, trunk update to 3.3.1
« on: August 18, 2018, 05:49:18 pm »
l.s.

A branch was made for a future series of 3.2.x FPC releases. A first release
of this branch is still months away, but the moment to test the compatibility
of your codebases with the future FPC is _NOW_!, while there is still time
to do something about it.

The svn designation of this fixes branch is branches/fixes_3_2

As a consequence, trunk will be updated to version 3.3.1, some people might have to update their scripts.

Thaddy

  • Hero Member
  • *****
  • Posts: 6916
Re: FPC 3.2.x series branched, trunk update to 3.3.1
« Reply #1 on: August 18, 2018, 11:07:22 pm »
Ok. Tnx.
Ada's daddy wrote this:"Fools are my theme, let satire be my song."

Blaazen

  • Hero Member
  • *****
  • Posts: 2640
  • POKE 54296,15
    • Eye-Candy Controls
Re: FPC 3.2.x series branched, trunk update to 3.3.1
« Reply #2 on: August 19, 2018, 12:21:23 am »
Quote
the moment to test the compatibility of your codebases with the future FPC is _NOW_!
This code
Code: Pascal  [Select]
  1. procedure TForm1.Button1Click(Sender: TObject);
  2. var a: array of Integer;
  3.     i: Integer;
  4. begin
  5.   SetLength(a, 10);  //HERE
  6.   for i:=0 to length(a)-1 do
  7.     a[i]:=i;
  8. end;
gives no warning at 3.0.4 but with the latest trunk it gives
"unit1.pas(36,14) Warning: Local variable "a" of a managed type does not seem to be initialized" at line with SetLength, which is silly since SetLength itself is initialization. SetLength passes parameter by refrence (var) but it is same in 3.0.4 and 3.1.1.
Lazarus 2.1.0 r59317M FPC 3.3.1 r39660 x86_64-linux-qt Chakra, Qt 4.8.7/5.11.1, Plasma 5.13.5
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.14

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 4813
    • wiki
Re: FPC 3.2.x series branched, trunk update to 3.3.1
« Reply #3 on: August 19, 2018, 01:36:59 am »
For Windows users: https://sourceforge.net/projects/lazarus-snapshots/files/

Those installers contain Lazarus trunk + fpc 3.2 fixes branch.

Ensure to set the checkbox "secondary installation", then they do not interfere with your stable install.

valdir.marcos

  • Hero Member
  • *****
  • Posts: 516
Re: FPC 3.2.x series branched, trunk update to 3.3.1
« Reply #4 on: September 17, 2018, 07:27:17 am »
l.s.

A branch was made for a future series of 3.2.x FPC releases. A first release
of this branch is still months away, but the moment to test the compatibility
of your codebases with the future FPC is _NOW_!, while there is still time
to do something about it.

The svn designation of this fixes branch is branches/fixes_3_2

As a consequence, trunk will be updated to version 3.3.1, some people might have to update their scripts.


2.0 RC1
ftp://ftp.freepascal.org/pub/lazarus/releases/Lazarus%20Windows%2032%20bits/Lazarus%202.0RC1/
ftp://ftp.freepascal.org/pub/lazarus/releases/Lazarus%20Windows%2064%20bits/Lazarus%202.0RC1/
I am confused.
Which one is most probably to be released: Lazarus 2.0.0 with FPC 3.0.4 or FPC 3.2.0?

https://sourceforge.net/projects/lazarus-snapshots/files/Window%2032/lazarus-1.9.0-58738-fpc-3.2.0-beta-39634-win32.exe/download
https://sourceforge.net/projects/lazarus-snapshots/files/Window%2064/lazarus-1.9.0-58738-fpc-3.2.0-beta-39634-win64.exe/download

ftp://ftp.freepascal.org/pub/lazarus/releases/Lazarus%20Windows%2032%20bits/Lazarus%202.0RC1/lazarus-2.0RC1-fpc-3.0.4-win32.exe
ftp://ftp.freepascal.org/pub/lazarus/releases/Lazarus%20Windows%2064%20bits/Lazarus%202.0RC1/lazarus-2.0RC1-fpc-3.0.4-win64.exe

https://sourceforge.net/projects/lazarus-snapshots/files/Window%2032/
https://sourceforge.net/projects/lazarus-snapshots/files/Window%2064/

ftp://ftp.freepascal.org/pub/lazarus/releases/Lazarus%20Windows%2032%20bits/Lazarus%202.0RC1/
ftp://ftp.freepascal.org/pub/lazarus/releases/Lazarus%20Windows%2064%20bits/Lazarus%202.0RC1/

JuhaManninen

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 3515
  • I like bugs.
Re: FPC 3.2.x series branched, trunk update to 3.3.1
« Reply #5 on: September 17, 2018, 11:23:40 am »
I am confused.
Which one is most probably to be released: Lazarus 2.0.0 with FPC 3.0.4 or FPC 3.2.0?
You asked the same question in another thread. I don't know why you are confused.

valdir.marcos

  • Hero Member
  • *****
  • Posts: 516
Re: FPC 3.2.x series branched, trunk update to 3.3.1
« Reply #6 on: September 18, 2018, 03:52:17 pm »
I am confused.
Which one is most probably to be released: Lazarus 2.0.0 with FPC 3.0.4 or FPC 3.2.0?
With FPC 3.0.4 obviously. FPC 3.2.0 will not be released for a long time. There is even no RC1 yet.

That said, testing with 3.2 branch is still recommended too, since once 3.2 is out the next minor (Lazarus 2.0.x) will probably use it.

I am confused.
Which one is most probably to be released: Lazarus 2.0.0 with FPC 3.0.4 or FPC 3.2.0?
You asked the same question in another thread. I don't know why you are confused.
Sorry for duplicating my post.
Thanks.

zamtmn

  • Sr. Member
  • ****
  • Posts: 345
Re: FPC 3.2.x series branched, trunk update to 3.3.1
« Reply #7 on: September 23, 2018, 10:35:15 am »
Blaazen
Quote
gives no warning at 3.0.4 but with the latest trunk it gives
"unit1.pas(36,14) Warning: Local variable "a" of a managed type does not seem to be initialized" at line with SetLength, which is silly since SetLength itself is initialization. SetLength passes
Yes I am also interested, will it be fixed?

Thaddy

  • Hero Member
  • *****
  • Posts: 6916
Re: FPC 3.2.x series branched, trunk update to 3.3.1
« Reply #8 on: September 30, 2018, 11:56:56 am »
No. If you followed the bug report on Mantis.
Case in point is that setlength() does NOT guarantee its values are initialized to a default. It just reserves space for a given number of elements. Even if the compiler MAY internally do something more.
As explained in the bug report and the follow ups it is trivial to actually initialize. (different syntax for objfpc and delphi mode, beware)
And as far as I can see there is no need for a fix.
Ada's daddy wrote this:"Fools are my theme, let satire be my song."

mse

  • Sr. Member
  • ****
  • Posts: 279
Re: FPC 3.2.x series branched, trunk update to 3.3.1
« Reply #9 on: September 30, 2018, 02:46:05 pm »
Quote
the moment to test the compatibility of your codebases with the future FPC is _NOW_!
This code
Code: Pascal  [Select]
  1. procedure TForm1.Button1Click(Sender: TObject);
  2. var a: array of Integer;
  3.     i: Integer;
  4. begin
  5.   SetLength(a, 10);  //HERE
  6.   for i:=0 to length(a)-1 do
  7.     a[i]:=i;
  8. end;
gives no warning at 3.0.4 but with the latest trunk it gives
"unit1.pas(36,14) Warning: Local variable "a" of a managed type does not seem to be initialized" at line with SetLength, which is silly since SetLength itself is initialization. SetLength passes parameter by refrence (var) but it is same in 3.0.4 and 3.1.1.
In MSEgui I use
Code: Pascal  [Select]
  1. {$ifndef mse_allwarnings}
  2.  {$if fpc_fullversion >= 030100}
  3.   {$warn 5089 off}
  4.   {$warn 5090 off}
  5.   {$warn 5093 off}
  6.   {$warn 6058 off}
  7.  {$endif}
  8. {$endif}
  9.  
in oder to suppress the unwanted warnings. Problem is that it does not work with -B, see
https://bugs.freepascal.org/view.php?id=34349
I agree that the warnings are wrong or at least sub optimal. Initializing the managed variables in code produces quite heavy redundant instructions:
Code: Pascal  [Select]
  1. procedure test();
  2. var
  3.  s1: string;
  4.  ar1: integerarty; //=array of integer
  5. begin
  6.  setlength(s1,10);
  7.  setlength(ar1,11);
  8. end;
  9.  
  10. MAIN_$$_TEST:
  11. .Lc1:
  12. .Ll1:
  13.         leaq    -120(%rsp),%rsp
  14. .Lc3:
  15. .Ll2:
  16.         movq    $0,(%rsp)
  17.         movq    $0,8(%rsp)
  18.         leaq    16(%rsp),%rdx
  19.         leaq    40(%rsp),%rsi
  20.         movl    $1,%edi
  21.         call    fpc_pushexceptaddr
  22.         movq    %rax,%rdi
  23.         call    fpc_setjmp
  24.         movslq  %eax,%rdx
  25.         movq    %rdx,104(%rsp)
  26.         testl   %eax,%eax
  27.         jne     .Lj6
  28. .Ll3:
  29.         movq    %rsp,%rdi
  30.         xorl    %edx,%edx
  31.         movl    $10,%esi
  32.         call    fpc_ansistr_setlength
  33. .Ll4:
  34.         movq    $11,112(%rsp)
  35.         movq    $RTTI_$MSETYPES_$$_INTEGERARTY,%rsi
  36.         leaq    112(%rsp),%rcx
  37.         leaq    8(%rsp),%rdi
  38.         movl    $1,%edx
  39.         call    fpc_dynarray_setlength
  40.  
Code: Pascal  [Select]
  1. procedure test();
  2. var
  3.  s1: string = '';
  4.  ar1: integerarty = nil; //=array of integer
  5. begin
  6.  setlength(s1,10);
  7.  setlength(ar1,11);
  8. end;
  9.  
  10. MAIN_$$_TEST:
  11. .Lc1:
  12. .Ll1:
  13.         leaq    -120(%rsp),%rsp
  14. .Lc3:
  15. .Ll2:
  16.         movq    $0,(%rsp)
  17.         movq    $0,8(%rsp)
  18.         leaq    16(%rsp),%rdx
  19.         leaq    40(%rsp),%rsi
  20.         movl    $1,%edi
  21.         call    fpc_pushexceptaddr
  22.         movq    %rax,%rdi
  23.         call    fpc_setjmp
  24.         movslq  %eax,%rdx
  25.         movq    %rdx,104(%rsp)
  26.         testl   %eax,%eax
  27.         jne     .Lj6
  28. .Ll3:
  29.         movq    $RTTI_$MSETYPES_$$_INTEGERARTY,%rdx ----redundant
  30.         movq    TC_$MAIN$_$TEST_$$_defaultar1,%rsi
  31.         leaq    8(%rsp),%rdi
  32.         call    fpc_dynarray_assign
  33.         movq    TC_$MAIN$_$TEST_$$_defaults1,%rsi
  34.         movq    %rsp,%rdi
  35.         call    fpc_ansistr_assign                  ----redundant
  36. .Ll4:
  37.         movq    %rsp,%rdi
  38.         xorl    %edx,%edx
  39.         movl    $10,%esi
  40.         call    fpc_ansistr_setlength
  41. .Ll5:
  42.         movq    $11,112(%rsp)
  43.         movq    $RTTI_$MSETYPES_$$_INTEGERARTY,%rsi
  44.         leaq    112(%rsp),%rcx
  45.         leaq    8(%rsp),%rdi
  46.         movl    $1,%edx
  47.         call    fpc_dynarray_setlength
  48.  

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus