HP aC++/HP C Programmer's Guide (B3901-90036; A.06.26; September 2011)
NOTE: Since all unqualified char types in the compilation unit will be affected by this
option (including those headers that define external and system interfaces), it is necessary
to compile the interfaces used in a single program uniformly.
+w64bit
The +w64bit option enables warnings that help detection of potential problems in
converting 32-bit applications to 64-bit. The option is equivalent to the +M2 option.
+wdriver
The +wdriver option enables warnings for PA-RISC options that would otherwise be
ignored silently on Integrity servers. With the addition of this option in version A.06.05,
a number of warnings for PA options that had been reported by previous compiler
versions were changed to be silently ignored by default. The intent is to give good PA-RISC
to Integrity makefile compatibility by default, but provide this option to help users clean
up unnecessary or misleading use of legacy options when desired.
+wendian
This option allows the user to identify areas in their source code that might have porting
issues when going between little-endian and big-endian.
+wendian will warn of a de-reference that could cause endian-dependent behavior:
char charVal = *(char *) int_ptr;
short shortVal = ((short *) long_ptr)[0];
This warning can be suppressed by adding an extra cast:
char charVal = *(char *) (void *)int_ptr; // OK
+wendian warns that the initialization which may be endian-dependent, such as using
hex constants to init byte arrays:
char a[4] = { 0x11, 0x22, 0x33, 0x44 };
char b[4] = { 'a', 'b', 'c', 'd'}; // OK
This warning can be suppressed by not using a hex/octal constant:
char a[4] = { 17, 0x22, 0x33, 0x44 }; // OK
+wendian also warns of unions that make assumptions about data layout:
union u1 {
char c[4];
int v; };
union u2 {
long long ll;
short s[4];
char c[8]; };
This warning can be suppressed by adding a dummy member:
86 Command-Line Options