[previous] 1012 [next] [E] Use of a C++ reference type ('type &') will be treated as a language extension.
Language extensions

C++ 'reference' declarations (declarations containing &) are not valid in ISO:C but because the "-ex C++" option is enabled, this syntax is being parsed as a language extension. If the language extension option were not enabled, message 1013 (a syntax error) would be generated instead.

For example:


/*PRQA S 553,2211,3199,3203,3205,3227,3408 ++*/
/************************/
/* OPTIONS: -ex C++     */
/************************/

int foo(int *a);


void func1(int &a)                  /* Message 1012 */
{
    int &b = a;                     /* Message 1012 */
    int *c = &a;
    int r;

    r = foo(&a);
}

See also:

QA·C Source Code Analyser 8.1.2
© 2013 Programming Research.
www.programmingresearch.com
Personality Groups | Glossary | Message Index Contents