Teuchos: Fix Clang 3.9 build warnings in BLAS wrappers
Created by: mhoemmen
@trilinos/teuchos
/scratch/prj/Trilinos/Trilinos/packages/teuchos/numerics/src/Teuchos_BLAS_wrappers.hpp:198:29: warning: 'zdotc_' has C-linkage specified, but returns user-defined type 'std::complex<double>' which is incompatible with C [-Wreturn-type-c-linkage]
std::complex<double> PREFIX ZDOT_F77(const int* n, const std::complex<double> x[], const int* incx, const std::complex<double> y[], const int* incy);
^
...
/scratch/prj/Trilinos/Trilinos/packages/teuchos/numerics/src/Teuchos_BLAS_wrappers.hpp:258:28: warning: 'cdotc_' has C-linkage specified, but returns user-defined type 'std::complex<float>' which is incompatible with C [-Wreturn-type-c-linkage]
std::complex<float> PREFIX CDOT_F77(const int* n, const std::complex<float> x[], const int* incx, const std::complex<float> y[], const int* incy);
^
...
Work-around if C99 exists is to use the built-in C types float _Complex
and double _Complex
. Teuchos already does that in one place. Note that with Microsoft Visual C++, C++11 support does not imply full C99 support (not sure if that's truly standards-compliant, but it's the case, which is why the current place where Teuchos uses these types currently does not use them with MS VC++).