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

Table Of Contents
2329 local class member %n requires a definition
Cause:
Member functions of local classes must be defined within the class definition.
Example:
int main() {
struct Struct {
void foo();
};
Struct s;
s.foo();
}
Action:
Define all required member functions of the local classes inside the class itself.
Reference:
ANSI/ISO C++ 9.8(2)
2336 unknown external linkage specification
Cause:
The linkage specification provided in the code is not known to this compiler implementation. The
C and C++ linkage are two linkage specifications that a standard conformant compiler should
support and linkage specifications for other languages are implementation defined.
Example:extern "XYZ" int foo();
Action:
Provide a valid linkage specification allowed by the compiler,like C or C++ , for example:
extern "C" int foo();
Reference:
ANSI/ISO C++ 7.5 (3)
2340 value copied to temporary, reference to temporary used
Cause:
References should be initialized to refer to a valid object or a function. In certain contexts, when
rvalues are used for initializing references, the compiler might create a temporary and bind that
to the reference. In such scenarios compiler will issue this diagnostic.
Example:
struct Init {
const int & mem;
Init() : mem(10) {}
};
Action:
Provide a proper object for initializing the reference.
Reference:
ANSI/ISO C++ 8.5.3 12.2
2363 invalid anonymous union -- nonpublic member is not allowed
Cause:
Anonynous unions can have only public non-static data members, private or protected members
are not allowed.
42 Diagnostics Details