RubixML / Tensor

A library and extension that provides objects for scientific computing in PHP.
https://rubixml.com
MIT License
232 stars 28 forks source link

Broken build with GCC 14 [-Wincompatible-pointer-types] #42

Open remicollet opened 9 months ago

remicollet commented 9 months ago

This was a warning This is now a error using GCC 14 (on Fedora 40)

/builddir/build/BUILD/php82-php-pecl-tensor-3.0.4/tensor-3.0.4/ext/kernel/require.c: In function 'zephir_require_ret':
/builddir/build/BUILD/php82-php-pecl-tensor-3.0.4/tensor-3.0.4/ext/kernel/require.c:54:19: error: passing argument 1 of 'zval_ptr_dtor' from incompatible pointer type [-Wincompatible-pointer-types]
   54 |     zval_ptr_dtor(zend_string_path);
      |                   ^~~~~~~~~~~~~~~~
      |                   |
      |                   zend_string * {aka struct _zend_string *}
In file included from /opt/remi/php82/root/usr/include/php/Zend/zend.h:36,
                 from /opt/remi/php82/root/usr/include/php/main/php.h:31,
                 from /builddir/build/BUILD/php82-php-pecl-tensor-3.0.4/tensor-3.0.4/ext/kernel/require.c:16:
/opt/remi/php82/root/usr/include/php/Zend/zend_variables.h:79:35: note: expected 'zval *' {aka 'struct _zval_struct *'} but argument is of type 'zend_string *' {aka 'struct _zend_string *'}
   79 | ZEND_API void zval_ptr_dtor(zval *zval_ptr);
      |                             ~~~~~~^~~~~~~~
/builddir/build/BUILD/php82-php-pecl-tensor-3.0.4/tensor-3.0.4/ext/kernel/require.c: In function 'zephir_require_once_ret':
/builddir/build/BUILD/php82-php-pecl-tensor-3.0.4/tensor-3.0.4/ext/kernel/require.c:127:19: error: passing argument 1 of 'zval_ptr_dtor' from incompatible pointer type [-Wincompatible-pointer-types]
  127 |     zval_ptr_dtor(zend_string_path);
      |                   ^~~~~~~~~~~~~~~~
      |                   |
      |                   zend_string * {aka struct _zend_string *}
/opt/remi/php82/root/usr/include/php/Zend/zend_variables.h:79:35: note: expected 'zval *' {aka 'struct _zval_struct *'} but argument is of type 'zend_string *' {aka 'struct _zend_string *'}
   79 | ZEND_API void zval_ptr_dtor(zval *zval_ptr);
      |                             ~~~~~~^~~~~~~~
remicollet commented 9 months ago

Also see https://github.com/phalcon/cphalcon/issues/16531