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

Table Of Contents
3290 Passing a non-POD object to a function with variable arguments has
undefined behavior. Object will be copied onto the stack instead of using
a constructor.
Cause:
A non-POD (POD stands for "plain old data") object is being passed to a function with variable
arguments. Object will be copied onto the stack instead of using a constructor.Varargs do not
know how to deal with non-POD types, this can lead to undefined behavior.
Example:
class A {
int i;
};
int foo(char*, ...);
int bar() {
A a;
foo("hello",a);
return 0;
}
Action:
Do not pass non-POD object to a function with variable arguments. If this is essential write a
conversion operator to convert from non-POD to POD type and call that operator before passing
the object to the variable arguments function.
Reference:
3348 declaration hides %nd
Cause:
A declaration hides another variable with the same name visible in this scope.
Example:
struct X {
X(int i) {
i = i;
}
int i;
};
Action:
Examine your code to see if any of the two declarations should be removed/modified.
Reference:
3353 %n has no corresponding member operator delete%s (to be called
if an exception is thrown during initialization of an allocated object)
Cause:
For member operator new, a corresponding member operator delete needs to be provided so that
it can be called for proper destruction in case an exception is thrown during the initialization of
the allocated object.
Example:
struct Pool {
Pool() { }
3290 Passing a non-POD object to a function with variable arguments has undefined behavior. Object will be copied onto
the stack instead of using a constructor.
51