![]() |
![]() |
1022 | ![]() |
||||
![]() | |||||||
| Language extensions | |||||||
The '__alignof__' operator has been used. Message 1022 identifies instances of this language extension. __alignof__ can be used in much the same way as 'sizeof'. Instead of returning a size, it returns a value which represents the alignment requirement of the operand (in bytes). As with 'sizeof', the operand may be either an expression or an explicit type. In the context of QA·C, __alignof__ will return the alignment value as determined from the configuration option -align. For example:
/*PRQA S 1257,2017,3198,3199,3203,3408 ++*/
extern void foo(void)
{
int test;
test = __alignof__(char); /* Message 1022 */
test = __alignof__(test); /* Message 1022 */
}
See also:
![]() | ||
| QA·C Source Code Analyser 8.1.2
© 2013 Programming Research. www.programmingresearch.com | Personality Groups | Glossary | Message Index | Contents |