HP Code Advisor Diagnostics
2365 anonymous union at global or namespace scope must be declared
static
Cause:
Anonynous unions at global or namespace scope should be qualified with static qualifier to limit
them to file scope.
Example:
union {
int i;
};
Action:
Add static storage class to the anonymous union declared at global or namespace scope. For
example:
static union {
int i;
};
Reference:
ANSI/ISO C++ 9.5(3)
2375 declaration requires a typedef name
Cause:
In a typedef declaration, the typedef name is missing. This case can occur when a declaration
tries to declare both a tag and a typedef, but the name of the typedef is not included.
Example: typedef int;
Action:
Either remove the typedef keyword or add a typedef name.
Reference:
2381 extra ";" ignored
Cause:
An extra semicolon was found at the end of some code construct, which was perhaps added by
mistake. It will be ignored.
Example: int main() {};
Action:
Remove the extra semicolon.
Reference:
2487 inline %n cannot be explicitly instantiated
Cause:
When explicit instantiation of a class template is done, inline functions will not be instantiated.
This diagnostic is just to mention this fact.
Example:
template <typename T>
class X {
void foo() {}
2365 anonymous union at global or namespace scope must be declared static 47