Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test program test-vector.c does not compile with GCC 14 #50

Open
frieben opened this issue Apr 28, 2024 · 0 comments
Open

Test program test-vector.c does not compile with GCC 14 #50

frieben opened this issue Apr 28, 2024 · 0 comments

Comments

@frieben
Copy link

frieben commented Apr 28, 2024

The declaration of the two-dimensional arrays hori and vert prevents compilation of test-vector.c with GCC 14 because of a conflicting declaration of function giza_vector_float using the argument type (const float *) for those variables. Compilation succeeds after modifying the function call

giza_vector_float (n, m, hori, vert, 0, 1, 0, 1, scale, 0, affine, 1000.);

by casting the types of arguments hor and vert according to the declaration of giza_vector_float, thus

giza_vector_float (n, m, (float *) &hori, (float *) &vert, 0, 1, 0, 1, scale, 0, affine, 1000.); .

It might be preferable though to adjust the declaration of giza_vector_float etc. in giza.h using variable length arrays instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant