Barry Smith <[email protected]> writes: > the clang static code analyzer reports > > In file included from > /sandbox/petsc/petsc.clone/include/petsc/private/matimpl.h:1233: > /sandbox/petsc/petsc.clone/include/petscbt.h:85:36: warning: The result of > the '<<' expression is undefined > BT_mask = (char)(1 << index%PETSC_BITS_PER_BYTE), > ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > Is the code wrong/unnecessary or clang?
I would guess it is complaining about C99 ยง6.5.7.3: If the value of the right operand is negative or is greater than or equal to the width of the promoted left operand, the behavior is undefined.
signature.asc
Description: PGP signature
