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

If you plan to run your program on the same system where you are compiling, you do
not need to use the +DS option. The compiler generates code tuned for your system.
If you plan to run your program on a particular model of the HP-UX system, and that
model is different from the one where you compile your program, use +DSmodel with
either the model number of the target system or the processor name of the target system.
Compiling in Networked Environments
When compiles are performed using diskless workstations or NFS-mounted file systems,
it is important that the default code generation and scheduling are based on the local
host processor. The system model numbers of the hosts where the source or object files
reside do not affect the default code generation and scheduling.
-S
The -S option compiles a program and logs the assembly language output in a
corresponding file with a .s suffix. The -S option is only for displaying the assembler
code. The generated code is not intended to be used as input to the assembler (as).
Example:
The following command compiles prog.C to assembly code rather than to object code,
and puts the assembly code in the file prog.s.
aCC -S prog.C
Data Alignment and Storage
This section describes default data storage allocation and alignment for HP compiler
data types.
Data storage refers to the size of data types, such as bool, short, int, float, and
char*. Data alignment refers to the way the HP compiler aligns data structures in
memory. Data type alignment and storage differences can cause problems when moving
data between systems that have different alignment and storage schemes. These
differences become apparent when a structure is exchanged between systems using
files or inter-process communication. In addition, misaligned data addresses can cause
bus errors when an attempt is made to dereference the address.
For information on unaligned data access, See “Handling Unaligned Data” (page 131).
Table 2-2 lists the size and alignment of the HP compiler data types:
Table 2-2 Size and Alignment of HP Compiler Data Types
AlignmentSize (in bytes)Data Type
1-byte1
bool
11
char, unsigned char, signed
char
40 Command-Line Options