HP Code Advisor Diagnostics Reference Guide (5900-1865, July 2011)

2.51 2265 %nd is inaccessible
Cause:
An attempt is made to access a private or protected member in the context where the member is
not accessible.
Example:
class A {
private:
int x;
} c;
c.x = 0;
Action:
Fix the access specifier of the member or the statement that is accessing the member.
Reference:
2.52 2267 old-style parameter list (anachronism)
Cause:
The given function is defined using the old style K&R syntax. The C standard has marked this syntax
as obsolescent, and it is not supported in C++. Consider using the standard C prototype syntax.
Example:
int foo(arg)
int arg;
{ return arg; }
Action:
Recode the function definition to use the recommended prototype-format definition.
Reference:
C99 6.9.1
2.53 2269 conversion to inaccessible base class %t is not allowed
Cause:
It is incorrect to assign a derived object to a protected or private base class pointer or reference
without an explicit cast. NOTE: If an explicit access specifier is missing while inheriting from a
base class then private inheritance is assumed. In case of inheriting from a struct public inheritance
is assumed.
Example:
class Base {};
class Derived: protected Base{};
Base *b = new Derived;
Action:
Check if you actually want to convert from the derived to base type. If yes, then provide an explicit
cast: Base *b = (Base*) new Derived;
Reference:
ANSI/ISO C++ 8.3.2 (4)
2.54 2276 name followed by :: must be a class or namespace name
Cause:
The qualifier type preceding :: is not declared or defined as a class or a namespace.
Example: T::type i;
38 Diagnostics Details