Skip to content

Commit 1c1ffb0

Browse files
authored
Annotate LAPACKE_lsame with the const attribute for GCC and compatible compilers
1 parent ab304cc commit 1c1ffb0

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

lapack-netlib/LAPACKE/include/lapacke_utils.h

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,11 @@ extern "C" {
6767
void LAPACKE_xerbla( const char *name, lapack_int info );
6868

6969
/* Compare two chars (case-insensitive) */
70-
lapack_logical LAPACKE_lsame( char ca, char cb );
70+
lapack_logical LAPACKE_lsame( char ca, char cb )
71+
#if defined __GNUC__
72+
__attribute__((const))
73+
#endif
74+
;
7175

7276
/* Functions to convert column-major to row-major 2d arrays and vice versa. */
7377
void LAPACKE_cgb_trans( int matrix_layout, lapack_int m, lapack_int n,

0 commit comments

Comments
 (0)