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

“Verbose Compile and Link Information” (page 122)
“Concatenating Options” (page 125)
Options to Control Code Generation
The following options allow you to control the kind of code that the compiler generates:
-c
+DOosname
+DDdata_model
+DSmodel
-S
-c
You can use the -c option to compile one or more source files without entering the
linking phase.
When compiled, the compiler produces an object file (a file ending with .o) for each
source file (a file ending with .c, .C, .s, or .i). Note that you must link object files
before they can be executed.
Example:
aCC -c sub.C prog.C
In this example, the compiler compiles sub.C and prog.C and puts the relocatable
object code in the files, sub.o and prog.o, respectively.
+DOosname
The +DOosname option sets the target operating system for the compiler, and is intended
for enabling optimizations that are not backward compatible.
For instance, the 11.23 compiler introduces new optimized math library functions that
require library support not available in prior operating systems. +DO can be used at
any level of optimization. The default value for osname is the operating system version
on which the compiler is invoked.
The syntax for this option is +DOosname, where osname is either 11.20, 11.22 or
11.23.
Example:
The following example generates code for the HP-UX 11.22 (or later) operating system.
Binary incompatible features introduced in later OS versions are inhibited.
aCC +DO11.22 +O3 app.C
+DDdata_model
The +DDdata_model option specifies the data model for the compiler.
40 Command-Line Options