HP C A.06.05 Reference Manual
Compiling and Running HP C Programs
Compiling HP C Programs
Chapter 9220
Examples of Compiler Commands
• cc -Aa prog.c
requests a strict ANSI C compilation of prog.c.
• cc -tp,/users/devel/cpp prog.c
uses /users/devel/cpp as the pathname for the preprocessing phase.
• cc -tpca,/users/devel/x prog.s
uses /users/devel/x/cpp for cpp, /users/devel/x/ctcom for ctcom, and
/users/devel/x/as for as; the assembly file prog.s is processed by the specified
assembler.
• cc -Aa prog.c procedure.o -o prog
compiles and links the file prog.c, creating the executable program file prog. The
compiler produces prog.o. The linker ld(1) links prog.o and procedure.o with all of
the HP C startup routines and the library routines from the HP C library
/usr/lib/hpux32/libc.so.
+uc Makes unqualified char data types unsigned.
+w Warns about all questionable constructs and gives
pedantic warnings.
+W
arg1
[,
arg2
,...arg
n
] Suppresses the specified warnings.
+We
n1
[,
n2
,...
nN
] Changes the specified warnings to errors.
+wn Specifies the level of warning messages. Warns
about all questionable constructs and gives pedantic
warnings.
+Ww
n1
[,
n2
,...
nN
] Enables the specified warnings, assuming all other
warnings are suppressed with -w or +w3.
+z Generates shared library object code (same as +Z in
64-bit mode).
+Z Generates shared library object code with a large
data linkage table (long-form PIC).
Table 9-1 HP C Compiler Options at a Glance (Continued)
Option Description