HP-UX Cadvise Diagnostics Reference Guide (5900-1865, August 2012)

Table Of Contents
Action:
Initialize the member outside the class: int i = 100; class Init { static const int *p_i; }; const int*
Init::p_i =
Reference:
ANSI/ISO C++ 9.4.2 9.2(4)
2322 object of abstract class type %t is not allowed
Cause:
By definition, objects of abstract types cannot be created; any such attempt will be flagged as an
error by the compiler.
Example:
class Base {
virtual void foo() = 0;
};
Base b;
Action:
Either remove the statement that attempts to create an object of an abstract class type or make the
class concrete/ non-abstract by removing the pure virtual functions.
Reference:
ANSI/ISO C++ 10.4(3)
2323 function returning abstract class %t is not allowed
Cause:
An abstract class cannot be used as a function return type, parameter type or as the type of an
explicit conversion.
Example:
class Base {
virtual void foo() = 0;
};
class Derived : public Base {
Derived bar();
};
Action:
Do not declare a function to accept as paramater or return an abstract class type.
Reference:
ANSI/ISO C++ 10.4(3)
2325 inline specifier allowed on function declarations only
Cause:
The inline keyword is meaningful for function declarations only.
Example: inline int i;
Action:
Remove the inline keyword. For example: int i;
Reference:
ANSI/ISO C++ 10.4(3)
2322 object of abstract class type %t is not allowed 41