Skip to content

Error with GCC 15 #340

@lahwaacz

Description

@lahwaacz

Building mwparserfromhell with GCC 15 results in this error:

gcc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=3 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -g -ffile-prefix-map=/build/python-mwparserfromhell-git/src=/usr/src/debug/python-mwparserfromhell-git -flto=auto -fPIC -Ilib -I/usr/include/python3.13 -c src/mwparserfromhell/parser/ctokenizer/avl_tree.c -o build/temp.linux-x86_64-cpython-313/src/mwparserfromhell/parser/ctokenizer/avl_tree.o
src/mwparserfromhell/parser/ctokenizer/avl_tree.c:24:13: error: ‘bool’ cannot be defined via ‘typedef’
   24 | typedef int bool;
      |             ^~~~
src/mwparserfromhell/parser/ctokenizer/avl_tree.c:24:13: note: ‘bool’ is a keyword with ‘-std=c23’ onwards
src/mwparserfromhell/parser/ctokenizer/avl_tree.c:24:1: warning: useless type name in empty declaration
   24 | typedef int bool;
      | ^~~~~~~
warning: build_ext: building extension "mwparserfromhell.parser._tokenizer" failed: command '/usr/bin/gcc' failed with exit code 1

To make things worse, the Python build (python -m build --wheel) continues regardless and results in a wheel without the C tokenizer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions