HP Code Advisor Diagnostics Reference Guide (5900-1865, July 2011)
Reference:
ANSI/ISO C++ 8.3.2 (4)
2.47 2251 array of reference is not allowed
Cause:
Array of reference is incorrect and is not allowed.
Example:int & iarr[5];
}
Action:
Remove the & and make it a plain array. For example: int iarr[5];
Reference:
ANSI/ISO C++ 8.3.2 (4)
2.48 2252 reference %n requires an initializer
Cause:
Reference variables should always be initialized, unless the reference is declared as extern , or it
is declared as a class member within a class declaration, or it is declared as a parameter or
function return type.
Example: int &ir;
}
Action:
Provide an initializer for the reference. For example: int i; int &ir = i;
Reference:
ANSI/ISO C++ 8.3.2 (4)
2.49 2260 explicit type is missing ("int" assumed)
Cause:
The declaration has a storage-class specifier,but no type was specified. The compiler will assume
the type of int. Omitting the type specifier is not valid in C++ or in C99, and is often considered
poor programming practice.
Example: static i;
Action:
Add a type specifier to the declaration.
Reference:
C99 6.5.2.2, 6.7.2; C++ Section 7
2.50 2263 duplicate base class name
Cause:
The same base class name is specified more than once in the base class list. A base class name
should appear only once in a base class list.
Example:
class Base {};
class Derived: public Base, protected Base {};
Action:
Remove the redundant base class name, for example: class Derived: public Base {};
Reference:
2.47 2251 array of reference is not allowed 37