HP aC++/HP C A.06.20 Programmer's Guide

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:
union u1 { // OK
char c[4];
int v;
char dummy; };
Another type of warning is on the use of IO functions that read/write persistent data
from files that may be endian-dependent:
read(0, &i, sizeof(i));
fread(&ai[0], sizeof(int), elems_of(ai, int), stdin);
write(1, &i, sizeof(i));
fwrite(&ai[0], sizeof(int), elems_of(ai, int), stdout);
This warning can be suppressed by adding an extra cast:
fread((char*)(void*)ai, sizeof(char), 1, stdin); // OK
Preprocessor Options
The following options are accepted by the preprocessor:
-C
-C
Using the -C option prevents the preprocessor from stripping comments. See the
description of cpp in the cpp(1) manpage for details.
-dM
-dM
When -dM is present, instead of normal preprocessor output the compiler lists the
#define directives it encounters as it preprocesses the file, thus providing a list of all
macros that are in effect at the start of the compilation. The -dM option requires that
-P or -E also be specified.
A common use of this option is to determine the compiler's predefined macros. For
example:
Preprocessor Options 95