Re: [petsc-dev] technical C question
7 Apr
2016
7 Apr
'16
2:37 p.m.
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.
3779
Age (days ago)
3779
Last active (days ago)
0 comments
1 participants
participants (1)
-
Jed Brown