The mode Variable Attribute

Linux The variable attribute mode allows you to override the type specifier in a variable declaration. The original type indicated by the type specifier is overridden by an integral type of a particular size. The size is indicated by the value of the mode parameter. For example, a mode value of __word__ results in an integer variable that is four bytes in size. The sign of the original type specifier is preserved.

Valid arguments for attribute mode are byte, word, and pointer, and the forms of these modes with leading and trailing double underscores.

The syntax is as follows:

>>-__attribute__--((--+-mode-----+--(--+-byte--------+--)--))--><
                      '-__mode__-'     +-word--------+
                                       +-pointer-----+
                                       +-__byte__----+
                                       +-__word__----+
                                       '-__pointer__-'
 
 

where mode is a type specifier that includes an indication of width.

Related References

IBM Copyright 2003