Re: [Interest] Void pointers for Mac ARM

2023-06-20 Thread Thiago Macieira
On Tuesday, 20 June 2023 17:46:04 PDT Thiago Macieira wrote: > On Tuesday, 20 June 2023 15:50:16 PDT Volker Hilsheimer via Interest wrote: > > Either way, it would perhaps help to boil all this down to some minimal > > code; you have a 2-byte aligned struct that you cast to and from void *, > > thi

Re: [Interest] Void pointers for Mac ARM

2023-06-20 Thread Thiago Macieira
On Tuesday, 20 June 2023 15:50:16 PDT Volker Hilsheimer via Interest wrote: > Either way, it would perhaps help to boil all this down to some minimal > code; you have a 2-byte aligned struct that you cast to and from void *, > this should be reproducible with small bit of code. And if you have that

Re: [Interest] Void pointers for Mac ARM

2023-06-20 Thread Volker Hilsheimer via Interest
(bringing this back to the original thread rather than the digest) On 20 Jun 2023, at 14:54, Turtle Creek Software wrote: On 19 Jun 2023, at 17:30, Thiago Macieira wrote: On Monday, 19 June 2023 04:13:51 PDT Turtle Creek Software wrote: The debugger showed the correct address but failed to cast

Re: [Interest] Void pointers for Mac ARM

2023-06-19 Thread Thiago Macieira
On Monday, 19 June 2023 04:13:51 PDT Turtle Creek Software wrote: > The debugger showed the correct address but failed to cast a > parameter. > > Can the ARM compiler handle #pragma pack (2) ? What does this have to do with casting? It would really help if you gave exact error messages. That inc

Re: [Interest] Void pointers for Mac ARM

2023-06-19 Thread coroberti
Sorry, no knowledge about the pragma and how it's handled by clang. I'd make it all 8-bytes aligned on 64-bit. Kind regards, Robert Iakobashvili On Mon, Jun 19, 2023 at 2:14 PM Turtle Creek Software wrote: > > Alignment is definitely possible. There was a similar p

Re: [Interest] Void pointers for Mac ARM

2023-06-19 Thread Turtle Creek Software
Alignment is definitely possible. There was a similar problem earlier in execution, and that had pointers to 2-byte aligned structs. We just rewrote the ugly void* code rather than try to diagnose it further. The debugger showed the correct address but failed to cast a parameter. Can the ARM com

Re: [Interest] Void pointers for Mac ARM

2023-06-18 Thread coroberti
On Sat, Jun 17, 2023 at 8:12 PM Turtle Creek Software wrote: > > Our app contains some old C-ish C++ code from an early 90's database called > NeoAccess. It often uses function pointers with void pointers as parameters. > Their code works OK for Mac & Windows, when built with the latest Qt5 on

Re: [Interest] Void pointers for Mac ARM

2023-06-18 Thread Thiago Macieira
On Saturday, 17 June 2023 10:09:42 PDT Turtle Creek Software wrote: > The code also builds OK with the latest Qt6, but running it on an M1 Mac > gives run-time errors. Void pointers to structs and objects don't cast > properly and stay null. Your diagnosis can't be correct. The ABI on Arm Macs is

[Interest] Void pointers for Mac ARM

2023-06-17 Thread Turtle Creek Software
Our app contains some old C-ish C++ code from an early 90's database called NeoAccess. It often uses function pointers with void pointers as parameters. Their code works OK for Mac & Windows, when built with the latest Qt5 on Intel. The code also builds OK with the latest Qt6, but running it on a