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

src/markupsafe/_speedups.c: build error with GCC14 [-Wincompatible-pointer-types] #466

Closed
tgurr opened this issue Oct 8, 2024 · 0 comments
Milestone

Comments

@tgurr
Copy link

tgurr commented Oct 8, 2024

Environment:

  • Python version: 3.12.7
  • MarkupSafe version: 3.0.0

With GCC13 this was only a warning but with GCC14 (https://gcc.gnu.org/gcc-14/porting_to.html) these are now errors resulting in _speedups.cpython-312-x86_64-linux-gnu.so not being built.

2024-10-08 11:36:34,974 root INFO building 'markupsafe._speedups' extension
2024-10-08 11:36:34,975 root INFO creating build/temp.linux-x86_64-cpython-312/src/markupsafe
2024-10-08 11:36:34,975 root INFO x86_64-pc-linux-gnu-cc -fno-strict-overflow -Wsign-compare -DNDEBUG -fwrapv -march=native -O2 -pipe -march=native -O2 -pipe -fPIC -I/usr/x86_64-pc-linux-gnu/include/python3.12 -c src/markupsafe/_speedups.c -o build/temp.linux-x86_64-cpython-312/src/markupsafe/_speedups.o
src/markupsafe/_speedups.c: In function 'escape_unicode':
src/markupsafe/_speedups.c:163:45: error: passing argument 1 of 'escape_unicode_kind1' from incompatible pointer type [-Wincompatible-pointer-types]
  163 |                 return escape_unicode_kind1(s);
      |                                             ^
      |                                             |
      |                                             PyObject * {aka struct _object *}
src/markupsafe/_speedups.c:75:39: note: expected 'PyUnicodeObject *' but argument is of type 'PyObject *' {aka 'struct _object *'}
   75 | escape_unicode_kind1(PyUnicodeObject *in)
      |                      ~~~~~~~~~~~~~~~~~^~
src/markupsafe/_speedups.c:165:45: error: passing argument 1 of 'escape_unicode_kind2' from incompatible pointer type [-Wincompatible-pointer-types]
  165 |                 return escape_unicode_kind2(s);
      |                                             ^
      |                                             |
      |                                             PyObject * {aka struct _object *}
src/markupsafe/_speedups.c:101:39: note: expected 'PyUnicodeObject *' but argument is of type 'PyObject *' {aka 'struct _object *'}
  101 | escape_unicode_kind2(PyUnicodeObject *in)
      |                      ~~~~~~~~~~~~~~~~~^~
src/markupsafe/_speedups.c:167:45: error: passing argument 1 of 'escape_unicode_kind4' from incompatible pointer type [-Wincompatible-pointer-types]
  167 |                 return escape_unicode_kind4(s);
      |                                             ^
      |                                             |
      |                                             PyObject * {aka struct _object *}
src/markupsafe/_speedups.c:127:39: note: expected 'PyUnicodeObject *' but argument is of type 'PyObject *' {aka 'struct _object *'}
  127 | escape_unicode_kind4(PyUnicodeObject *in)
      |                      ~~~~~~~~~~~~~~~~~^~
@davidism davidism added this to the 3.0.1 milestone Oct 8, 2024
@davidism davidism closed this as completed Oct 8, 2024
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

2 participants