[Bug c/59852] Support sparse-style __attribute__((bitwise)) (type attribute)

josh at joshtriplett dot org gcc-bugzilla@gcc.gnu.org
Fri Jan 17 09:39:00 GMT 2014


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59852

--- Comment #1 from Josh Triplett <josh at joshtriplett dot org> ---
Note in particular the bit about typedefs.  Two identical declarations both
using __attribute__((bitwise)) create two variables with different types, but
two declarations both usin the same typedef declared with
__attribute__((bitwise)) create two variables with the same type.  In code:

__attribute__((bitwise)) unsigned a, b;
__attribute__((bitwise)) unsigned c, d;
typedef __attribute__((bitwise)) unsigned foo_t;
foo_t e, f;
foo_t g, h;

a and b have the same type.
c and d have the same type.
e, f, g, and h have the same type.



More information about the Gcc-bugs mailing list