Skip to content
Prev 5708 / 12125 Next

[R-pkg-devel] warning: type of ‘zhpevx_’ does not match original declaration [-Wlto-type-mismatch]

My file myzhpevx.cpp starts with:

<quote>
#define USE_FC_LEN_T
#include <R.h>
#include "Rmath.h"

#ifdef FC_LEN_T
extern "C" {

  void zhpevxC(char **jobz, char **range, char **uplo, int *n, Rcomplex *ap,
     double *vl, double *vu, int *il, int *iu, double *abstol, int *m,
     double *w, Rcomplex *z, int *ldz, Rcomplex *work, double *rwork,
     int *iwork, int *ifail, int *info) {

          void F77_NAME(zhpevx)(char *jobz, char *range, char *uplo,
      const int *n, Rcomplex *ap, const double *vl,
      const double *vu, const int *il, const int *iu,
      const double *abstol, int *m, double *w,
      Rcomplex *z, const int *ldz, Rcomplex *work, double *rwork,
      int *iwork, int *ifail, int *info,
      FC_LEN_T jobz_len,  FC_LEN_T range_len,  FC_LEN_T uplo_len);
</quote>

So if I understand correctly what you are saying, you suggest that FC_LEN_T was not correctly defined by the CRAN team?

Should I just write something like (adding the middle instruction below to my existing code above)?:

<quote>
#ifdef FC_LEN_T
typedef long long int FC_LEN_T;
extern "C" {
</quote>

Thank you
Pierre
Message-ID: <SYCPR01MB5278ACC7379B3608D084B0CD93660@SYCPR01MB5278.ausprd01.prod.outlook.com>
In-Reply-To: <CAF8bMcY-519pgq0JfjMjgz-Uy6FJx9zeLxrh0ygH=B==DueP+Q@mail.gmail.com>