You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've compiled Lapack 3.11.0 in Debian with gcc 12.2.0. All works well, but some warnings have been appeared compiling LAPACKE. There are not any serious, but I paste them here:
gcc -O3 -Wall -I../include -c -o lapacke_zlarfb.o lapacke_zlarfb.c
lapacke_zlarfb.c: In function ‘LAPACKE_zlarfb’:
lapacke_zlarfb.c:63:22: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
63 | if( !forward && ( col && k > nrows_v ) || ( !col && k > ncols_v )) {
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
gcc -O3 -Wall -I../include -c -o lapacke_zlarfb_work.o lapacke_zlarfb_work.c
lapacke_zlarfb_work.c: In function ‘LAPACKE_zlarfb_work’:
lapacke_zlarfb_work.c:84:22: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
84 | if( !forward && ( col && k > nrows_v ) || ( !col && k > ncols_v )) {
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
gcc -O3 -Wall -I../include -c -o lapacke_dlarfb.o lapacke_dlarfb.c
lapacke_dlarfb.c: In function ‘LAPACKE_dlarfb’:
lapacke_dlarfb.c:62:22: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
62 | if( !forward && ( col && k > nrows_v ) || ( !col && k > ncols_v )) {
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
gcc -O3 -Wall -I../include -c -o lapacke_dlarfb_work.o lapacke_dlarfb_work.c
lapacke_dlarfb_work.c: In function ‘LAPACKE_dlarfb_work’:
lapacke_dlarfb_work.c:83:22: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
83 | if( !forward && ( col && k > nrows_v ) || ( !col && k > ncols_v )) {
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
gcc -O3 -Wall -I../include -c -o lapacke_clarfb.o lapacke_clarfb.c
lapacke_clarfb.c: In function ‘LAPACKE_clarfb’:
lapacke_clarfb.c:63:22: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
63 | if( !forward && ( col && k > nrows_v ) || ( !col && k > ncols_v )) {
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
gcc -O3 -Wall -I../include -c -o lapacke_clarfb_work.o lapacke_clarfb_work.c
lapacke_clarfb_work.c: In function ‘LAPACKE_clarfb_work’:
lapacke_clarfb_work.c:84:22: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
84 | if( !forward && ( col && k > nrows_v ) || ( !col && k > ncols_v )) {
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
gcc -O3 -Wall -I../include -c -o lapacke_slarfb.o lapacke_slarfb.c
lapacke_slarfb.c: In function ‘LAPACKE_slarfb’:
lapacke_slarfb.c:62:22: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
62 | if( !forward && ( col && k > nrows_v ) || ( !col && k > ncols_v )) {
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
gcc -O3 -Wall -I../include -c -o lapacke_slarfb_work.o lapacke_slarfb_work.c
lapacke_slarfb_work.c: In function ‘LAPACKE_slarfb_work’:
lapacke_slarfb_work.c:83:22: warning: suggest parentheses around ‘&&’ within ‘||’ [-Wparentheses]
83 | if( !forward && ( col && k > nrows_v ) || ( !col && k > ncols_v )) {
| ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
The text was updated successfully, but these errors were encountered:
&& has a higher order of precedence in C than ||, so
a&&b||c
is same as
(a&&b ) ||c
I agree with gcc though that it would be good to have "parentheses around && within ||". (And it would also have the added benefit to remove the gcc warning.)
I've compiled Lapack 3.11.0 in Debian with gcc 12.2.0. All works well, but some warnings have been appeared compiling LAPACKE. There are not any serious, but I paste them here:
The text was updated successfully, but these errors were encountered: