Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2020-08

Regression in 3.2.0 ??

4 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Peter

I wondering if there is a regression in 3.2.0. The Lazarus file fpguiwsprivate.pp no longer compiles. It was fine in 3.0.4.

The error message "No matching implementation for interface method ... CDecl; found " is strange as the interface and implementation are both clearly defined as stdcall. I can find no reference to CDecl in the release notes, and stdcall only mentioned under Darwin. (I'm using x86_64).

function TFPGUIPrivate._AddRef: longint; stdcall;
begin
  Result := -1;
end;

Has anyone any ideas to fix it?   It compiles if I change stdcall to CDecl, but I have no idea if that is a valid fix. (More info; see bug 37566)

Regards,
Peter

Michael Van Canneyt
to Peter
Peter wrote 13 lines
I wondering if there is a regression in 3.2.0. The Lazarus file fpguiwsprivate.pp no longer compiles. It was fine in 3.0.4. The error message "No matching implementation for interface method ... CDecl; found " is strange as the interface and implementation are both clearly defined as stdcall. I can find no reference to CDecl in the release notes, and stdcall only mentioned under Darwin. (I'm using x86_64). function TFPGUIPrivate._AddRef: longint; stdcall; begin   Result := -1; end; Has anyone any ideas to fix it?   It compiles if I change stdcall to CDecl, but I have no idea if that is a valid fix. (More info; see bug 37566)

It is a valid fix for non-windows platforms. So you'll have to ifdef this.

Michael.

Sven Barth
to Peter: I wondering if there is a regression in 3.2.0. The Lazarus file fpguiwsprivate.pp no…

Peter via fpc-pascal schrieb am Mi., 19.
Aug. 2020, 08:17:

Has anyone any ideas to fix it? It compiles if I change stdcall to CDecl, but I have no idea if that is a valid fix. (More info; see bug 37566)

Using the same ifdef as in the interface is the correct fix. The compiler now more strictly ensures that the directives of the implementation match the one in the interface (in this case cdecl (which is the default on non-Windows) vs. stdcall). This should probably be mentioned in the User Changes of 3.2.0...

Regards,
Sven