Menu

Commit [r13104]  Maximize  Restore  History

ace: pass ints to A4GLSQL_next_column, not 4GL INTEGERs

The CODE block in get_cols passed the addresses of two 4GL INTEGERs to

int A4GLSQL_next_column(char** colname, int* dtype, int* size);

A 4GL INTEGER is a long, so on a 64-bit platform the callee filled four bytes
of each eight-byte variable and left the rest as it found it. That worked only
because both happened to be zero when it ran, and gcc 14 rejects it outright:

error: passing argument 2 of 'A4GLSQL_next_column' from incompatible
pointer type

The values are now taken in ints and copied across, which is what the API
describes.

mikeaubury 2026-09-07

changed /aubit4glsrc/trunk/compilers/ace/generate.4gl
/aubit4glsrc/trunk/compilers/ace/generate.4gl Diff Switch to side-by-side view
Loading...