NRPyElliptic passes incompatible pointer types

Issue #2797 resolved
Roland Haas created an issue

With gcc-14 NRPyElliptic fails with

Creating /Users/rhaas/Cactus/configs/sim/lib/libthorn_Meudon_Bin_BH.a
/Users/rhaas/Cactus/configs/sim/build/NRPyEllipticET/conformally_flat_BBH/NRPyEllipticET_conformally_flat_BBH_Initialize_ADMBase.c: In function 'NRPyEllipticET_conformally_flat_BBH_Initialize_ADMBase':
/Users/rhaas/Cactus/configs/sim/build/NRPyEllipticET/conformally_flat_BBH/NRPyEllipticET_conformally_flat_BBH_Initialize_ADMBase.c:147:71: error: passing argument 6 of 'NRPyEllipticET_conformally_flat_BBH_interpolate_solution_to_ADMBase' from incompatible pointer type [-Wincompatible-pointer-types]
  147 |                                                                       input_array,
      |                                                                       ^~~~~~~~~~~
      |                                                                       |
      |                                                                       CCTK_REAL8 (*)[Nxx_plus_2NGHOSTS1][Nxx_plus_2NGHOSTS0] {aka double (*)[Nxx_plus_2NGHOSTS1][Nxx_plus_2NGHOSTS0]}
In file included from /Users/rhaas/Cactus/configs/sim/build/NRPyEllipticET/conformally_flat_BBH/NRPyEllipticET_conformally_flat_BBH_Initialize_ADMBase.c:3:
/Users/rhaas/Cactus/arrangements/EinsteinInitialData/NRPyEllipticET/src/conformally_flat_BBH/./conformally_flat_BBH_NRPy_function_prototypes.h:74:92: note: expected 'const CCTK_REAL8 *' {aka 'const double *'} but argument is of type 'CCTK_REAL8 (*)[Nxx_plus_2NGHOSTS1][Nxx_plus_2NGHOSTS0]' {aka 'double (*)[Nxx_plus_2NGHOSTS1][Nxx_plus_2NGHOSTS0]'}
   74 |                                                                           const CCTK_REAL *input_gf,
      |                                                                           ~~~~~~~~~~~~~~~~~^~~~~~~~

Basically a CCTK_REAL* is not the same as a CCTK_REAL[][].

Comments (3)

  1. Leonardo Rosa Werneck

    I addressed the issue, making sure tests still passed locally. I have pushed the change and am now waiting for the CI results.

  2. Log in to comment