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

build failure on src/cql2ccl.c with C23 with bool usage #133

Closed
mtasaka opened this issue Jan 13, 2025 · 1 comment · Fixed by #134
Closed

build failure on src/cql2ccl.c with C23 with bool usage #133

mtasaka opened this issue Jan 13, 2025 · 1 comment · Fixed by #134

Comments

@mtasaka
Copy link
Contributor

mtasaka commented Jan 13, 2025

developing gcc15 defaults to C23, and yaz fails to compile with gcc15 (or gcc14 -std=c23) like:

libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I/usr/include/libxml2 -DWITH_GZFILEOP -I/usr/include/p11-kit-1 -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -I/usr/include/hiredis -D_FILE_OFFSET_BITS=64 -c cql2ccl.c  -fPIC -DPIC -o .libs/cql2ccl.o
make[2]: Leaving directory '/builddir/build/BUILD/yaz-5.34.3-build/yaz-5.34.3/src'
cql2ccl.c:162:12: error: 'bool' cannot be used here
  162 | static int bool(struct cql_node *cn,
      |            ^~~~
cql2ccl.c:162:12: note: 'bool' is a keyword with '-std=c23' onwards
cql2ccl.c:162:17: error: expected identifier or '(' before 'struct'
  162 | static int bool(struct cql_node *cn,
      |                 ^~~~~~
cql2ccl.c: In function 'cql_to_ccl_r':
cql2ccl.c:242:16: error: expected expression before 'bool'
  242 |         return bool(cn, pr, client_data);
      |                ^~~~
make[2]: *** [Makefile:1120: cql2ccl.lo] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Entering directory '/builddir/build/BUILD/yaz-5.34.3-build/yaz-5.34.3/src'

bool is keyword on C23.

@mtasaka
Copy link
Contributor Author

mtasaka commented Jan 13, 2025

yaz is 5.34.3 .

mtasaka added a commit to mtasaka/yaz that referenced this issue Jan 14, 2025
C23 now regards `bool` as keyword, so avoid using
`bool` for function name.

Closes indexdata#133 .
adamdickmeiss pushed a commit that referenced this issue Jan 27, 2025
C23 now regards `bool` as keyword, so avoid using
`bool` for function name.

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

Successfully merging a pull request may close this issue.

1 participant