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

Can the ARM compiler handle #pragma pack (2) ?

Casey McDermott

On Mon, Jun 19, 2023 at 2:50 AM coroberti <> wrote:

> 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 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

Reply via email to