From 1c1ffb0591186e50311670369dee2cb450980d9a Mon Sep 17 00:00:00 2001 From: Martin Kroeker Date: Sat, 26 Feb 2022 19:27:34 +0100 Subject: [PATCH] Annotate LAPACKE_lsame with the const attribute for GCC and compatible compilers --- lapack-netlib/LAPACKE/include/lapacke_utils.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lapack-netlib/LAPACKE/include/lapacke_utils.h b/lapack-netlib/LAPACKE/include/lapacke_utils.h index a9236d23f..ec29f24fc 100644 --- a/lapack-netlib/LAPACKE/include/lapacke_utils.h +++ b/lapack-netlib/LAPACKE/include/lapacke_utils.h @@ -67,7 +67,11 @@ extern "C" { void LAPACKE_xerbla( const char *name, lapack_int info ); /* Compare two chars (case-insensitive) */ -lapack_logical LAPACKE_lsame( char ca, char cb ); +lapack_logical LAPACKE_lsame( char ca, char cb ) +#if defined __GNUC__ + __attribute__((const)) +#endif + ; /* Functions to convert column-major to row-major 2d arrays and vice versa. */ void LAPACKE_cgb_trans( int matrix_layout, lapack_int m, lapack_int n,