Re: [fpc-pascal] Documentation or compiler bug?

2023-07-08 Thread Hairy Pixels via fpc-pascal
> On Jul 8, 2023, at 3:57 PM, Michael Van Canneyt via fpc-pascal > wrote: > > You must put the cdecl (which is the calling convention) before the external: o so the order is the problem. That error message is misleading and should be changed. I know c library functions are external and

Re: [fpc-pascal] Documentation or compiler bug?

2023-07-08 Thread Michael Van Canneyt via fpc-pascal
On Sat, 8 Jul 2023, Michael Van Canneyt via fpc-pascal wrote: On Sat, 8 Jul 2023, Hairy Pixels via fpc-pascal wrote: In fact I filed a bug today which was related. Notice how I didn't use cdecl in the program but another user tried to compile and had problems with cdecl also.

Re: [fpc-pascal] Documentation or compiler bug?

2023-07-08 Thread Michael Van Canneyt via fpc-pascal
On Sat, 8 Jul 2023, Hairy Pixels via fpc-pascal wrote: In fact I filed a bug today which was related. Notice how I didn't use cdecl in the program but another user tried to compile and had problems with cdecl also. https://gitlab.com/freepascal.org/fpc/source/-/issues/40342

Re: [fpc-pascal] Documentation or compiler bug?

2023-07-08 Thread Hairy Pixels via fpc-pascal
In fact I filed a bug today which was related. Notice how I didn't use cdecl in the program but another user tried to compile and had problems with cdecl also. https://gitlab.com/freepascal.org/fpc/source/-/issues/40342

Re: [fpc-pascal] Documentation or compiler bug?

2023-07-08 Thread Michael Van Canneyt via fpc-pascal
On Sat, 8 Jul 2023, Hairy Pixels via fpc-pascal wrote: I get the error "Procedure directive "CDECL" cannot be used with "EXTERNAL"" when I use "cdecl" with external modifiers yet the docs at https://www.freepascal.org/docs-html/ref/refsu73.html say": When compiling this, and linking to the

[fpc-pascal] Documentation or compiler bug?

2023-07-07 Thread Hairy Pixels via fpc-pascal
I get the error "Procedure directive "CDECL" cannot be used with "EXTERNAL"" when I use "cdecl" with external modifiers yet the docs at https://www.freepascal.org/docs-html/ref/refsu73.html say": When compiling this, and linking to the C-library, the strlen function can be called throughout