Files
codeql/cpp/ql/src/Likely Bugs/AmbiguouslySignedBitField.cpp
2018-08-02 17:53:23 +01:00

6 lines
209 B
C++

struct {
int s : 4; //wrong: behavior of bit-field members with implicit signage vary across compilers
unsigned int : 24; //correct: explicitly unsigned
signed int : 4; //correct: explicitly signed
} bits;