[Bug c/59852] Support sparse-style __attribute__((bitwise)) (type attribute)
josh at joshtriplett dot org
gcc-bugzilla@gcc.gnu.org
Tue Jan 21 00:39:00 GMT 2014
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59852
--- Comment #4 from Josh Triplett <josh at joshtriplett dot org> ---
Also note that arithmetic operations between a bitwise and a known-zero value
do not warn.
The warning on ~ of a value smaller than int only occurs if the value is not
subsequently stuffed back into the same bitwise type. For instance, this does
not warn:
typedef unsigned short __attribute__((bitwise)) le16;
le16 i, j;
le16 k = ~i | j;
More information about the Gcc-bugs
mailing list