What does GCC's __attribute__(bitwise)
mean? The attribute isn't mentioned in the info pages of GCC-4.6. I stumbled upon it in the file open-iscsi-2.0.871/include/iscsi_proto.h
in source the project Open-ISCSI where it is used as
...
/*
* If running svn modules we may need to define these.
* This should not go upstream since this is already properly defined there
*/
#ifdef __CHECKER__
#define __bitwise__ __attribute__((bitwise))
#else
#define __bitwise__
#endif
#ifdef __CHECK_ENDIAN__
#define __bitwise __bitwise__
#else
#define __bitwise
#endif
/*! initiator tags; opaque for target */
typedef uint32_t __bitwise__ itt_t;
/*! below makes sense only for initiator that created this tag */
#define build_itt(itt, age) ((__force itt_t)\
((itt) | ((age) << ISCSI_AGE_SHIFT)))
#define get_itt(itt) ((__force uint32_t)(itt_t)(itt) & ISCSI_ITT_MASK)
#define RESERVED_ITT ((__force itt_t)0xffffffff)
...
I'm suspecting something involving byte-order but I can't make any sense of the snippet given above.
This is apparently not used by GCC but by Sparse, a semantic parser for C used by the Linux kernel. It is documented in Documentation/dev-tools/sparse.txt.
Google says here that bitwise don't mean much anymore.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With