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

Building with clang fails due to 'const' attribute on function returning 'void' for version 9.5 #202

Open
FragmentedCurve opened this issue Jul 15, 2024 · 2 comments

Comments

@FragmentedCurve
Copy link

When compiling libj version 9.5 with clang using the command CC=clang ./build_libj.sh, yields the following errors:

In file included from ../../../../jsrc/viavx5.c:6:
In file included from ../../../../jsrc/j.h:229:
../../../../jsrc/../sleef/include/sleefquad.h:259:31: error: 'const' attribute on function returning 'void'; attribute ignored [-Werror,-Wignored-attributes]
  259 | SLEEF_IMPORT SLEEF_CONST void Sleef_storeq2_sse2(Sleef_quad *, Sleef_quadx2);
      |                               ^
../../../../jsrc/../sleef/include/sleefquad.h:328:31: error: 'const' attribute on function returning 'void'; attribute ignored [-Werror,-Wignored-attributes]
  328 | SLEEF_IMPORT SLEEF_CONST void Sleef_storeq2_avx2128(Sleef_quad *, Sleef_quadx2);
      |                               ^
../../../../jsrc/../sleef/include/sleefquad.h:397:31: error: 'const' attribute on function returning 'void'; attribute ignored [-Werror,-Wignored-attributes]

I've truncated the output. To build successfully, I have to run CC=clang CFLAGS=" -Wno-ignored-attributes" ./build_libj.sh.

This bug does not exist in the master branch, only 9.5.

@bilam
Copy link
Contributor

bilam commented Jul 15, 2024

compilation was successful with the version of gcc at that time. I don't feel the need to retrofit unless there is a maintenance release of 9.5

@moon-chilled
Copy link
Contributor

i think this is a sleef bug; __attribute__((const)) should not be applied to those functions

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

3 participants