HP aC++/HP C A.06.28 Programmer's Guide Integrity servers (769150-001, March 2014)

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.
data_model can be one of the following:
32 (This value generates ILP32 code and is the default.)
64 (This value generates LP64 code.)
This option specifies the data model for the compiler. Table 2 lists the differences between the two
data models.
Table 2 ILP32 Data Model and LP64 Data Model
LP64 Data ModelILP32 Data Model
The size of an int data type is 32-bits. The size of a long
or pointer data type is 64-bits.
The size of an int, long, or pointer data type is
32-bits.
The preprocessor predefined macros__LP64__ and _LP64
are defined.
The preprocessor predefined macro _ILP32 is defined.
32 Command-Line Options