HP Code Advisor Diagnostics

Not a conversion function, constructor, or destructor, therefore something where a type specifier
is expected.
Example:
struct X {
i;
};
Action:
Provide a declaration specifier.
Reference:
C99 6.7.2
2082 storage class is not first
Cause:
The placement of a storage-class specifier other than at the beginning of the declaration specifier
in a declaration is an obsolescent feature.
Example:
int static i = 0;
Action:
Place the storage-class specifier first in the declaration.
Reference:
C99 6.7, 6.7.1
2102 forward declaration of enum type is nonstandard
Cause:
It is non standard to provide forward declarations for enumerations.
Example:
enum Consts;
Action:
Define the enumerations instead of forward declaration as: enum Consts { MIN = 10, MAX = 100
};
Reference:
ANSI/ISO C++ 7.2(1)
2108 signed bit field of length 1
Cause:
The compiler has detected the usage of a signed bit field of length 1. This can lead to unintuitive
behavior as assigning 1 to such a bit-field value will make the value -1.
Example:
int field : 1;
Action:
30 Diagnostics Details