[previous] 0454 [next] [C] The address-of operator '&' cannot be applied to an object declared with 'register'.
Constraint violations REFERENCE - ISO:C90-6.3.3.2 Address and Indirection Operators - Constraints

This is a constraint error

The address-of operator '&' cannot be applied to an object declared with the 'register' storage-class specifier. For example:


/*PRQA S 2211,2711,3199,3203,3219,3408,3450 ++*/

void foo (void)
{
    register int a;
    int *pa;

    pa = &a;               /* Message 0454 */
}


MISRA C:2012 Rules applicable to message 0454:

Rule-1.1  (Required) The program shall contain no violations of the standard C syntax and constraints, and shall not exceed the implementation's translation limits


See also:

QA·C Source Code Analyser 8.1
MISRA C:2012 Compliance Module 1.0
© 2012 Programming Research.
www.programmingresearch.com
Personality Groups | Glossary | Message Index | MISRA C:2012 Rule Index Contents