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 <supp...@turtlesoft.com> wrote: > > 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 compiler handle #pragma pack (2) ? > > Thanks, > Casey McDermott > TurtleSoft.com > > On Mon, Jun 19, 2023 at 2:50 AM coroberti <corobe...@gmail.com> wrote: >> >> On Sat, Jun 17, 2023 at 8:12 PM Turtle Creek Software >> <supp...@turtlesoft.com> 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 Intel. >> > >> > 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. We haven't tried Qt6 on Windows yet but will do >> > that soon. >> > >> > Any ideas on how to fix it? We've abandoned NeoAccess for our new app but >> > still need it to convert data from existing files. Rewriting their code >> > is a nightmare. >> >> Casey, >> Perhaps, checking the alignment of the void* pointers in question >> could provide you with some clues. >> >> Kind regards, >> Robert Iakobashvili >> ............................ _______________________________________________ Interest mailing list Interest@qt-project.org https://lists.qt-project.org/listinfo/interest