Clp icon indicating copy to clipboard operation
Clp copied to clipboard

Compiler warning

Open BjornPetersen opened this issue 4 years ago • 1 comments

For ClpPackedMatrix.cpp.

Compiler gives this warning: warning C4554: '&': check operator precedence for possible error; use parentheses to clarify precedence

But what is supposed to happen here: if (nOther<MAX_ONES&nOnes<MAX_ONES)...

is it: if ((nOther < MAX_ONES) & (nOnes < MAX_ONES))... or if (nOther < MAX_ONES && nOnes < MAX_ONES)... or if (nOther < (MAX_ONES & nOnes) < MAX_ONES)...?

BjornPetersen avatar Oct 27 '20 14:10 BjornPetersen

&&

Thanks (I think both same in practice)

John Forrest

On 27/10/2020 14:33, BjornPetersen wrote:

Compiler gives this warning: warning C4554: '&': check operator precedence for possible error; use parentheses to clarify precedence

But what is supposed to happen here: |if (nOther<MAX_ONES&nOnes<MAX_ONES)...|

is it: |if ((nOther < MAX_ONES) & (nOnes < MAX_ONES))...| or |if (nOther < MAX_ONES && nOnes < MAX_ONES)...|?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/coin-or/Clp/issues/164, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABWJYHDNOY277AGLZEQM3QDSM3K5LANCNFSM4TA5IUUQ.

jjhforrest avatar Oct 27 '20 14:10 jjhforrest