% man cc Reformatting entry. Wait... aCC/cc(1) aCC/cc(1) Requires Optional aC++/ANSI C Compiler Software NAME aCC - aC++ compiler cc, c89, c99 - C compiler SYNOPSIS aCC [ options ] files cc [ options ] files c89 [ options ] files c99 [ options ] files DESCRIPTION aCC invokes the HP-UX aC++ compiler. C++ source code is compiled directly to object code. cc is the HP-UX C compiler. c89 is the HP-UX ANSI-conforming C89 compiler. c99 is the HP-UX ANSI-conforming C99 compiler. (If C or cc is mentioned below it usually means it applies to all C drivers. c89/c99 do not support any -A* options.) aCC/cc/c89 or c99 commands use ctcom/ecom, the compiler, for preprocessing, syntax and type checking, as well as for code generation. These commands accept several types of arguments as files: + Arguments whose names end with .c or .C or one of the standard C++ suffix conventions are understood to be C++ source files. For C, only the arguments with .c are accepted. Each is compiled and the resulting object file is left in a file having the corresponding name, but suffixed with .o instead of .c or .C. However, if a single C++ or C source file is compiled and linked all in one step, the .o file is deleted. + Similarly, arguments whose names end with .s are understood to be assembly source files and are assembled, producing a .o file for each .s file. + Arguments whose names end with .i are taken to be preprocessed source files. (See the -P option below.) (For C, they are compiled without invoking cpp (see cpp(1))). Each object file is left in a file having the corresponding name, but suffixed with .o instead of .i. + Arguments of the form -lx cause the linker to search the library libx.so or libx.a in an attempt to resolve currently unresolved external references. Because a library is searched when its name is encountered, placement of a -l is significant. If a file contains an unresolved external reference, the library containing the definition must be placed after the file on the command line. See ld(1) for further details. Hewlett-Packard Company - 1 - aC++/C Version A.06.00 aCC/cc(1) aCC/cc(1) Requires Optional aC++/ANSI C Compiler Software + Arguments of the form -l:libx.suffix cause the linker to search the library libx.so or libx.a (depending on suffix) in an attempt to resolve currently unresolved external references. It is similar to the -l option except the current state of the -Wl,-a option is not important. + All other arguments, such as those names ending with .o, .a or .so are taken to be relocatable object files and are passed to ld(1) to be included in the link operation. Arguments and options can be passed to the compiler through the CXXOPTS (CCOPTS for C) environment variable as well as on the command line, or in a file using the +opts option. The compiler picks up the value of CXXOPTS (CCOPTS for C) and divides these options into two sets; those options which appear before a vertical bar (|) delimited by whitespace, and those options which appear after the vertical bar. The first set of options is placed before any of the command-line parameters to aCC (cc); the second set of options is placed after the command-line parameters to aCC (cc). If the vertical bar is not present, all options are placed before the command-line parameters. For example (in sh(1) notation), for aCC, export CXXOPTS="-v | -lm" aCC -g prog.C is equivalent to aCC -v -g prog.C -lm and for C, CCOPTS="-v | -lm" export CCOPTS cc -w prog.c is equivalent to cc -v -w prog.c -lm Options NOTE: For detailed information about any aCC option, see the HP aC++ Online Programmer's Guide. To invoke the guide, use the aCC +help option, or use your HTML browser to open the file /opt/aCC/html/$LANG/guide/index.htm. For detailed information about any cc option, see the HP C Online Help. To invoke online help, use the cc +help option, or use your HTML browser to open the file /opt/ansic/html/$LANG/guide/index.htm. Hewlett-Packard Company - 2 - aC++/C Version A.06.00 aCC/cc(1) aCC/cc(1) Requires Optional aC++/ANSI C Compiler Software The following options are recognized by aCC, cc, c89 and c99 unless otherwise noted or obvious: -AA Turns on newly supported ANSI C++ Standard features such as namespace std and the new C++ Standard Library. This option also implies -Aa. Include paths are changed to include_std and library is libstd_v2. The compiler default is -AA but without -Wc,-ansi_for_scope. See -Aa and HP aC++ Online Programmer's Guide. NOTE: Objects and libraries compiled with -AA are binary incompatible with objects compiled without -AA. C++ only. -Aa For aC++, turns on newly supported ANSI C++ Standard features like Koenig lookup and correct scoping for variables declared in conditional statements like for- loops. Additional features may be enabled by this option in the future. For C, compile under strict ANSI mode (ANSI programming language C standard ISO 9899:1990). When compiling under ANSI mode, the header files would define only those names (macros and typedefs) specified by the Standard. To access macros and typedefs that are not defined by the ANSI Standard but are provided by the HP-UX Operating System, define the symbol _HPUX_SOURCE; or use the extension option, -Ae described below. -AC89 Enables the C89 Standard, ANSI mode (ANSI programming language C standard ISO 9899:1990). -AC99 Enables partial support for the C99 Standard, mode (ANSI programming language C standard ISO/IEC 9899:1999). -Ae In aC++, invokes aCC as an ANSI-C compiler, with additional support for HP-C language extensions. Refer to the HP-C compiler documentation for details of the HP-C language extensions. In C, this is the default, Extended ANSI mode. Same as -Aa -D_HPUX_SOURCE +e. This would define the names (macros and typedefs) provided by the HP-UX Operating System and, in addition, allows extensions such as C99 features in this release (complex and imaginary data types, STDC pragmas), $ characters in identifier names, sized enums, and sized bit-fields, and 64-bit integral types. Additional extensions may be added to this option in the future. -Aarm Enables support for the Tru64 ARM dialect. v6 only Hewlett-Packard Company - 3 - aC++/C Version A.06.00 aCC/cc(1) aCC/cc(1) Requires Optional aC++/ANSI C Compiler Software -Agcc Enables partial support for the GNU C dialect. v6 only NOTE: If used with aCC(1) it also requires the -Ae option. -Ag++ Enables partial support for the GNU C++ dialect. v6 only -AOa -AOe See corresponding -Aa or -Ae option. In addition, allows the optimizer to aggressively exploit the assumption that the source code conforms to the ANSI programming language C or C++ standard. At present, the effect is to make +Otype_safety=ansi the default. As new independently-controllable optimizations are developed that depend on the ANSI standards, the flags that enable those optimizations may also become the default under -AOa/-AOe. -AP Turns off -AA mode. Uses the older classic C++ runtime libraries. C++ only. -b Cause the linker ld(1) to create a shared library rather than a normal executable file. Object files processed with this option must contain position independent code (PIC). For details see ld(1), HP-UX Linker and Libraries Online User's Guide and the Programming on HP-UX manual. -c Suppress the link edit phase of the compilation, and force an object (.o) file to be produced for each .c, .C or .i file even if only one program is compiled. Object files produced from C/C++ programs must be linked before being executed. -C Prevent the preprocessor from stripping C/C++ style comments. -Dname=def -Dname Define the preprocessor symbol name, as if by '#define'. NOTE: __ia64 and __HP_aCC are defined automatically for aCC and __HP_cc for cc/c89/c99 or aCC with -Ae. The following is the list of default -D flags: -AP: -D__hpux -D__ia64=1 -D_BIG_ENDIAN=1 -D__STDCPP__ -D__HP_aCC=version-string -AA: Same as -AP, and also defines -D_HP_NAMESPACE_STD aCC -Ae: -D__hpux -D__unix -D__ia64=1 -D_BIG_ENDIAN=1 Hewlett-Packard Company - 4 - aC++/C Version A.06.00 aCC/cc(1) aCC/cc(1) Requires Optional aC++/ANSI C Compiler Software -D__STDCPP__ -D__HP_cc=version-string -D__STDC_EXT__ -D_HPUX_SOURCE -D_INCLUDE_LONGLONG aCC -Ae -Aa: -D__hpux -D__unix -D__ia64=1 -D_BIG_ENDIAN=1 -D__STDCPP__ -D__HP_cc=version-string aCC -Ae -Agcc: -D_HP_GNUC_COMPATIBLE aCC -Ag++: -D_HP_GNUG_COMPATIBLE aCC -Aarm: -D_HP_ARM_COMPATIBLE cc -Ae: -D__hpux -D__unix -D__ia64=1 -D_BIG_ENDIAN=1 -D__HP_cc=version-string -D__STDC_EXT__ -D_HPUX_SOURCE -D_INCLUDE_LONGLONG cc/c89/c99 -Aa: -D__hpux -D__unix -D__ia64=1 -D_BIG_ENDIAN=1 -D__HP_cc=version-string cc -Agcc: -D_HP_GNUC_COMPATIBLE -dynamic Produces dynamically bound executables. See -minshared for partially statically bound executables. The default behavior is dynamic. -eepsym Set the default entry point address for the output file to be that of the symbol epsym. This option applies only to executable files. -exec Indicates that any object files created will be used to create an executable file. Constants with a protected or hidden export class are placed in the read-only data section. This option also implies -Bprotected_def. -ext Allow various C++ extensions. Currently -ext enables the 64 bit integer (long long) data type. This is a synonym for the +e option. -E Preprocess named C/C++ files and send the result to standard output. -.suffix Instead of using standard output for the -E option, place the output from each .c file into a file with the corresponding .suffix. -fast This option is a synonym for +Ofast. Hewlett-Packard Company - 5 - aC++/C Version A.06.00 aCC/cc(1) aCC/cc(1) Requires Optional aC++/ANSI C Compiler Software -fpeval=precision Specifies the minimum precision to use for floating point expression evaluation. The possible values for precision are float, double and extended. This option does not affect the precision of parameters, return types, or assignments. The default is -fpeval=float. -[no]fpwidetypes Enables the extended and quad floating point data types. The default is -nofpwidetypes. The compiler defines _FPWIDETYPES when -fpwidetypes is in effect. -g0 Cause the compiler to generate full debug information for the symbolic debugger. -g -g1 Cause the compiler to generate minimal symbolic debug information, thereby decreasing the size of the object file. This is the default. Specifically, the -g0 option emits full debug information for every class referenced in a file, which can result in redundant information. The -g1 option causes complete class information to be generated only for the file in which it is defined (debug info is emitted for the first non-inline, non-pure virtual function). If an entire application is compiled with the -g1 option no debugger functionality is lost. NOTE: This may be impossible in practice since HP supplied libraries like libstd.a would have to be compiled with the -g1 option. It also may not work if part of the application is in a shared library. Compiling some files with -g0 may help solve the problem. -G Prepares the object file for profiling with gprof(1). -Idir Change the algorithm used by the preprocessor pass for finding include files to also search in directory dir. See the HP aC++ Online Programmer's Guide and HP C Online Help. -I- The directory of the including file is no longer used as the starting point to search for include files enclosed with "". Instead, the list of paths will start with the directory specified in the first -I option. Files enclosed with <> are searched for using the paths following -I-. -ipo Enable interprocedural optimizations across files. Object files produced using this option contain Hewlett-Packard Company - 6 - aC++/C Version A.06.00 aCC/cc(1) aCC/cc(1) Requires Optional aC++/ANSI C Compiler Software intermediate code in IELF format. At link time, ld automatically invokes the interprocedural optimizer u2comp if any of the input object files is an IELF file. This option is ignored at optimization levels +O0 and +O1. It is enabled by default when +O4 or +Ofaster are used. -lx Refer to the fourth and fifth bullet items at the beginning of the DESCRIPTION section. -L dir Change the algorithm used by the linker to search for libx.so or libx.a. The -L option causes ld to search in dir before searching in the default locations. This option is effective only if it precedes the -l option on the command line. See ld(1) for details. -minshared Indicates that the result of the current compilation is going into an executable file that will make minimal use of shared libraries. Equivalent to -exec -Bprotected -Wl,-a,archive_shared. NOTE: The application should be consistently compiled and linked with this option. -mt Sets various -D flags to enable multi-threading. Also sets -lpthread. +Oopenmp automatically implies -mt. For details see HP aC++ Online Programmer's Guide and HP C Online Help. -n Cause the output file from the linker to be marked as shareable. For details and system defaults, see ld(1). -N Cause the output file from the linker to be marked as unshareable. For details and system defaults, see ld(1). -ooutfile Specify outfile as the name for the linker output file. The default name is a.out. Specifies the name of the shared library when used with -b. Specifies the name of the object file when used with -c. -O Invoke the optimizer with level 2 optimization. Equivalent to +O2. Can be expressed as +O. -p Arrange for the compiler to produce code that counts the number of times each routine is called. Also, if link editing takes place, replace the standard startup routine by one that automatically calls monitor() at the start (see monitor(3C)) and arranges to write out a mon.out file at normal termination of execution of the Hewlett-Packard Company - 7 - aC++/C Version A.06.00 aCC/cc(1) aCC/cc(1) Requires Optional aC++/ANSI C Compiler Software object program. prof can then be used to generate an execution profile (see prof(1)). -P Preprocess named C/C++ files and leave the result in corresponding files suffixed with .i. -q Cause the output file from the linker to be marked as demand loadable. For details and system defaults, see ld(1). -Q Cause the output file from the linker to be marked as not demand loadable. For details and system defaults, see ld(1). -r Retain relocation information in the output file for subsequent re-linking. The ld command does not report undefined symbols. An error results when used with -b. -s Cause the output of the linker to be stripped of symbol table information. See strip(1) for more details. The use of this option prevents the use of a symbolic debugger on the resulting program. Also see ld(1) for additional details. -S Compile the named C++/C files, and leave the assembly language output in corresponding files suffixed with .s. The files are left in the current directory. NOTE: The .s output of the compiler is not intended for use by as(1). NOTE: With +O4 the assembly output is generated during the link step. -tx,name Substitute or insert subprocess x with name where x is one or more of a set of identifiers indicating the subprocess(es). This option works in two modes: 1) if x is a single identifier, name represents the full path name of the new subprocess; 2) if x is a set of identifiers, name represents a prefix to which the standard suffixes are concatenated to construct the full path names of the new subprocesses. The x can take one or more of the values: a Assembler (standard suffix is as) c Compiler body (standard suffix is ctcom/ecom) C See c f Filter tool (standard suffix is c++filt) l Linker (standard suffix is ld) p Preprocessor (standard suffix is cpp.ansi) -tp must be used before any -Wp options can be passed to cpp.ansi. Hewlett-Packard Company - 8 - aC++/C Version A.06.00 aCC/cc(1) aCC/cc(1) Requires Optional aC++/ANSI C Compiler Software NOTE: To enable the external preprocessor, use: -tp,/opt/langtools/lbin/cpp.ansi u Stand-alone code generator (standard suffix is u2comp) x All subprocesses. -usymbol Enter symbol as an undefined symbol in ld's symbol table. The resulting unresolved reference is useful for linking a program solely from object files in a library. More than one symbol can be specified, but each must be preceded by -u. See ld(1). -Uname Undefines any name that has been defined prior to the preprocessing stage of compilation. -v Enable verbose mode, which produces a step-by-step description of the compilation process on standard error. -V Display the version numbers of the current compiler and linker (if the linker is executed). -w Suppress warning messages. -Wx,arg1[,arg2...] Hand off the argument[s] to subprocess x, where x can assume one of the values listed under the -t option as well as d (driver program) but not u (stand-alone code generator subprocess) nor x (all subprocesses). -Y Enable support of 8-bit, 16-bit and 4-byte EUC characters in comments, string literals and character constants. -z Do not bind anything to address zero. This ld(1) option allows run-time detection of null pointers. See the note on pointers below. -Z Allow dereferencing of null pointers. See the note on pointers below. The -z and -Z are linker options. See ld(1) for more details. +A Cause the linker ld(1) to use only archive libraries for all occurrences of the -l option. Also inform the C++ run-time environment that no shared libraries will be used by the program. NOTE: Not available on Itanium(R)-based platform. See -minshared. Cannot be used when calling shl_load(3) directly or indirectly. See HP aC++ Online Programmer's Guide, HP C Online Programmer's Guide, HP-UX Linker and Libraries Hewlett-Packard Company - 9 - aC++/C Version A.06.00 aCC/cc(1) aCC/cc(1) Requires Optional aC++/ANSI C Compiler Software Online User's Guide and setlocale(3) for more information. +cond_rodata This option enables a single compilation to be used for generating both executables (-exec) and shared libraries (-dynamic). At linktime, the linker will choose the appropriate section so that const data that have initializers with relocations can put in a read- only section for executables. v6 only NOTE: This option requires a newer linker. +d Prevents the expansion of inline functions. Useful when debugging. Equivalent to +inline_level=0. See +inline_level for the default. +dryrun Generate subprocess information for a given command line without running the subprocesses. +e See the -ext option. +FPflags Specify how the run time environment for floating-point operations should be initialized at program start up. The default is that all trapping behaviors are disabled. See ld(1) for specific values of flags. To dynamically change these settings at run time, refer to fesetenv(3M). +help Invokes the HP aC++ Online Programmer's Guide or HP C Online Help. +ild +ildrelink These incremental linking options are passed to the linker. For details, see ld(1). +inline_level num This option controls how C/C++ inlining hints influence aCC or cc. (For C, use the __inline keyword.) Specify num as an integral value between 0 and 9. num Meaning 0 No inlining is done (same effect as the +d option). 1 Only functions marked with the inline keyword or impled by the language to be inline are considered for inlining. 2 More inlining than level 1. This is the default level at optimization levels +O2, +O3, and +O4. 3-8 Increasing levels of inliner aggressiveness. 9 Attempt to inline all functions other than recursive functions or those with a variable number of arguments. Hewlett-Packard Company - 10 - aC++/C Version A.06.00 aCC/cc(1) aCC/cc(1) Requires Optional aC++/ANSI C Compiler Software The default level depends on +Olevel as shown in the following table: level num 0 1 1 1 2 2 3 2 4 2 NOTE: The options +Oinline and +Oinlinebudget also influence inlining aggressiveness. +legacy_v5 Enable the use of the older v5 compiler, ctcom. The default is the v6 compiler, ecom. +legacy_cpp[=external_preprocessor] Preprocesses the file using an external C or C++ preprocessor. The default preprocessor invoked with this option is /opt/langtools/lbin/cpp.ansi. +Mlevel Cause migration warnings to be emitted. Defined values for level are: 0 (Default) ANSI migration warnings. These warnings alert the programmer to the so- called Quiet Changes between the K&R behavior (-Ac) and the ANSI behavior (-Aa). For details on the Quiet Changes , refer to the Rationale Document which is available with the ANSI Programming Language C Standard ISO 9899:1990. 1 Platform migration warning when migrating from a PA processor application to an Itanium(R)-based application. 2 Data model migration warnings. These warnings alert the programmer to code that may work differently in the LP64 data model than in the ILP32 data model. For C only. +m[d] +make[d] This option outputs the double quoted ("") enclosed include file dependency information in the format for make(1). With +m the output goes to stdout. With +md the output goes to a file with the suffix .d. The directory and prefix of this file is the same as the object file, which can be affected by the -o option. NOTE: Specify -E to suppress generation of the object file. In this case, no preprocessor output is generated. Hewlett-Packard Company - 11 - aC++/C Version A.06.00 aCC/cc(1) aCC/cc(1) Requires Optional aC++/ANSI C Compiler Software +M[d] +Make[d] Same as +m except both <> and "" enclosed include files are output as dependencies. +noeh Disable exception handling. Note that mixing objects compiled both with and without +noeh can have undesired results. Object destruction, for example, will not be done for objects local to functions compiled with the +noeh option. For C++ only. +nostl This option can be used to substitute another STL instead of the default or to provide the user full control over the include and library search paths used in a given compilation by suppressing all default -I and -L paths as well as -lstd and -lstream. Use the -v option to see the effect of +nostl. +[no]nrv This option can be used to enable the Named Return Value optimization. The call to the copy constructor is eliminated when returning a local variable. The default is +nonrv. For C++ only. +[no]objdebug This option, when used with any of the -g options, will cause the debug information to be left in the object files instead of being placed in the a.out and the links will be faster. +objdebug is the default at compile time. +noobjdebug can be used at link time to continue to place the debug info into the a.out, even if some objects were compiled with +objdebug. NOTE: Object files and archive libraries must be accessible to the debugger if the +objdebug method of storing debug information is used. NOTE: -g must be used with +objdebug when using +ild. +opts filename The file indicated by filename contains a list of options which are processed as if they were specified on the command line at the point of the +opts option. +p Disallow all anachronistic constructs. Ordinarily the compiler gives warnings about anachronistic constructs; using the +p option, the compiler will not compile code containing anachronistic constructs. +profilebucketsize=[16|32] The +profilebucketsize option is passed to ld(1). It can be used with -G or -p to control the profile bucket size. See gprof(1) and ld(1) for more details. +sb Unqualified bit fields are treated as signed. The default is +sb. NOTE: +uc will override this for char bit fields. Hewlett-Packard Company - 12 - aC++/C Version A.06.00 aCC/cc(1) aCC/cc(1) Requires Optional aC++/ANSI C Compiler Software +[no]srcpos Control the generation of source position information for the Caliper performance analysis tool. When +srcpos is in effect (the default), the compiler generates this information. When +nosrcpos is in effect, the compiler does not generate this information, and the compiler will instruct the linker to discard any of this information encountered in object files. +time Generate separate timing information for compilation subprocesses. For each subprocess, estimated time is generated in seconds for user processes, system calls, and total processing time. +tls=mode The +tls option controls how Thread Local Storage is referenced. (Allocated with the __thread keyword.) The default mode is dynamic. This allows shared libraries to be loaded dynamically. There is a slight runtime cost. The mode static can be used for the initial set of libraries, libraries that are not dynamically loaded. +tru64 Enables treating non-prototyped int arguments and returns as long. Only useful for C with +DD64. +unum Allow pointers to access non-natively aligned data. This option alters the way that the compiler accesses dereferenced data. Use of this option may reduce the efficiency of generated code. (See also #pragma pack in the HP aC++ Online Programmer's Guide for a more efficient method.) 1 Assume single byte alignment. Dereferences are performed with a series of single-byte loads and stores. 2 Dereferences are performed with a series of two-byte loads and stores. 4 Dereferences are performed with a series of four-byte loads and stores. +ub Unqualified bit fields are treated as unsigned. The default is +sb. +uc Treats "plain" char data type as unsigned char. (Overloading and mangling are unchanged.) This option is to help in porting applications from environments where unqualified (plain) char type is treated as unsigned char instead of the default treatment as signed char. Since all unqualified char types in the compilation unit will be affected by this option (including those headers that define external and system interfaces) it is necessary to compile all of Hewlett-Packard Company - 13 - aC++/C Version A.06.00 aCC/cc(1) aCC/cc(1) Requires Optional aC++/ANSI C Compiler Software the interfaces used in a single program uniformly. +w Warn about all questionable constructs. Without the +w option, the compiler issues warnings only about constructs that are almost certainly problems. +Warg1[,arg2,...,argn] Selectively suppresses any specified warning messages, where arg1 through argn are valid compiler warning message numbers. +We[arg1[,arg2,...,argn]] Selectively interpret any specified warning or future error messages as errors. arg1 through argn are valid compiler message numbers. +We without any message numbers will do all messages. +Wwarg1[,arg2,...,argn] Selectively treats compiler suggestions as warnings. arg1 through argn are valid compiler message numbers. Conflicts between +W, +Ww and +We are resolved based on their severity, with +We being the highest and +W the lowest. Options (Symbol binding) The following -B options are recognized by aCC and cc to specify whether references to global symbols may be resolved to symbols defined in the current load module, or whether they must by assumed to be potentially resolved to symbols defined in another load module. All -B options are applied in a left to right order, so a later option may supersede an earlier one. -Bdefault=symbol[,symbol...] The named symbols are assigned the default export class. These symbols may be imported or exported outside of the current load module. The compiler will access tentative and undefined symbols through the linkage table. Any symbol that is not assigned to another export class through use of another -B option (or the deprecated +O[no]extern option) will have the default export class. The -Bdefault option may also may also be used on a per-symbol basis to specify exceptions to global -Bprotected, -Bhidden or -Bextern options. -Bdefault:filename The file indicated by filename contains a list of Hewlett-Packard Company - 14 - aC++/C Version A.06.00 aCC/cc(1) aCC/cc(1) Requires Optional aC++/ANSI C Compiler Software symbols, separated by spaces or newlines. These symbols are assigned the default export class. -Bextern=symbol[,symbol...] The named symbols, or all undefined symbols if no list is provided, are assigned the default export class. Additionally, the compiler will inline the import stub for calls to these symbols. No compile-time binding of these symbols will be done. All references to these symbols will be through the linkage table, so an unnecessary performance penalty will occur if -Bextern is applied to a listed symbol that is resolved in the same load module. -Bextern:filename The file indicated by filename contains a list of symbols, separated by spaces or newlines. These symbols are assigned the default export class. Additionally, the compiler will inline the import stub for calls to these symbols. No compile-time binding of these symbols will be done. All references to these symbols will be through the linkage table, so an unnecessary performance penalty will occur if -Bextern is applied to a symbol that is resolved in the same load module. -Bhidden[=symbol[,symbol...]] The named symbols, or all symbols if no symbols are specified, are assigned the hidden export class. The hidden export class is similar to the protected export class. These symbols will not be preempted by symbols from other load modules, so the compiler may bypass the linkage table for both code and data references and bind them to locally defined code and data symbols. In addition, hidden symbols will not be exported outside the current load module. The linker may eliminate them from a shared library, but in an executable, they remain accessible to the debugger unless +Oprocelim is also specified. When used with no symbol list, -Bhidden implies -Wl,-aarchive_shared, causing the linker to prefer an archive library over a shared library if one is available. This can be overridden by following the -Bhidden option with a subsequent -Wl,-a option. -Bhidden:filename The file indicated by filename contains a list of symbols, separated by spaces or newlines. These symbols are assigned the hidden export class. Hewlett-Packard Company - 15 - aC++/C Version A.06.00 aCC/cc(1) aCC/cc(1) Requires Optional aC++/ANSI C Compiler Software -Bprotected[=symbol[,symbol...]] The named symbols, or all symbols if no symbols are specified, are assigned the protected export class. That means these symbols will not be preempted by symbols from other load modules, so the compiler may bypass the linkage table for both code and data references and bind them to locally defined code and data symbols. When used with no symbol list, -Bprotected implies -Wl,-aarchive_shared, causing the linker to prefer an archive library over a shared library if one is available. This can be overridden by following the -Bprotected option with a subsequent -Wl,-a option. -Bprotected:filename The file indicated by filename contains a list of symbols, separated by spaces or newlines. These symbols are assigned the protected export class. -Bprotected_data Marks only data symbols as having the protected export class. -Bprotected_def Same as -Bprotected but only locally defined (non- tentative) symbols are assigned the protected export class. -Bsymbolic All symbols are assigned the protected export class. Equivalent to -Bprotected with no symbol list. Options (precompiled headers) The following options are recognized by aCC and cc to support precompiled headers. You can reduce compile time by precompiling common include (header) files. Refer to the HP aC++ Online Programmer's Guide for information about using the following options: +hdr_cache Enables Header Caching. NOTE: The size of the compiler maintained header cache can grow to be quite large, see HP aC++ Online Programmer's Guide on how to free the disk space used by this cache. +hdr_create pchfile Creates the precompiled header file pchfile for subsequent use when compiling an application or a library with the +hdr_use option. NOTE: To suppress creation of the object file specify: -o /dev/null. Refer to the HP aC++ Online Programmer's Hewlett-Packard Company - 16 - aC++/C Version A.06.00 aCC/cc(1) aCC/cc(1) Requires Optional aC++/ANSI C Compiler Software Guide. +hdr_dir path Specifies path to be used as the location of the directory that will contain header caching information. The default value is aCC_cache in the directory of the source file. +hdr_info Report on the compiler's header caching compilation and reuse activities. +hdr_use pchfile Compiles using the specified precompiled header file pchfile. The file pchfile must have been created by using the +hdr_create option. +hdr_v Specify verbose information when creating or using a precompiled headerfile. Options (templates) The following options are recognized by aCC to support the template instantiation system. You can use the following options to specify how your templates are compiled. The HP aC++ Online Programmer's Guide /opt/aCC/html/$LANG/templates/templates.htm provides more information about templates. +inst_compiletime Causes the compiler to use the compile time (CTTI) instantiation mechanism to instantiate templates. This occurs for every template used or explicitly instantiated in this translation unit and for which a definition exists in the translation unit. This is the default. +inst_directed Indicates to the compiler that no templates are to be instantiated (except explicit instantiations). +inst_implicit_include Specifies that the compiler use the cfront source rule for locating template definition files. For the cfront based HP C++ compiler, if you are using default instantiation (that is, you are not using a map file), you must have a template definition file for each template declaration file, and these must have the same file name prefix. This restriction does not apply in HP aC++. Therefore, if your code was written for HP C++ and/or you wish to follow this rule when compiling with HP aC++, you need to specify the +inst_implicit_include option. NOTE: This option is strongly discouraged and the sources should be modified to conform to the C++ Hewlett-Packard Company - 17 - aC++/C Version A.06.00 aCC/cc(1) aCC/cc(1) Requires Optional aC++/ANSI C Compiler Software Standard. +inst_include_suffixes "list" The list parameter is a list of space separated file extensions or suffixes, enclosed in quotes, that template definition files can have. The default is: ".c .C .cxx .CXX .cc .CC .cpp". Options (deprecated) The options listed in this section are provided for compatibility purposes, but are scheduled for deprecation. Their use is discouraged. +ES[no]lit NOTE: This option is deprecated and may not be supported in future releases. Use +Olit=all for +ESlit and +Olit=none for +ESnolit. Place [do not place] string literals into read-only memory. This may save space in the resulting executable by coalescing identical string literals, and can promote data sharing in a multi-user application. The default is +ESlit. +O[no]all NOTE: This option is deprecated and may not be supported in future releases. +Oall is equivalent to +O4 +Onolimit +Oaggressive. +O[no]aggressive NOTE: This option is deprecated and may not be supported in future releases. Use +Ofast for +Oaggressive. +O[no]conservative NOTE: This option is deprecated and may not be supported in future releases. Use +Ofltacc=strict +Ofenvaccess for +Oconservative. +dfname NOTE: This option is deprecated and is not supported in this release. This option is a synonym for +Oprofile=use:filename. +O[no]extern NOTE: This option is deprecated and may not be supported in future releases. Use -Bextern for +Oextern and -Bprotected for +Onoextern. +I NOTE: This option is deprecated and is not supported in this release. This option is a synonym for +Oprofile=collect. Hewlett-Packard Company - 18 - aC++/C Version A.06.00 aCC/cc(1) aCC/cc(1) Requires Optional aC++/ANSI C Compiler Software +O[no]libcalls NOTE: This option is deprecated and may not be supported in future releases. On Itanium(R)-based HP- UX, including a system header file will cause the functions declared therein to be eligible for libcalls transformations, regardless of the state of +O[no]libcalls. +O[no]moveflops NOTE: This option is deprecated and may not be supported in future releases. Use +Ofltacc=strict +Ofenvaccess for +Onomoveflops. +P NOTE: This option is deprecated and is not supported in this release. This option is a synonym for +Oprofile=use. Options (other) See DEPENDENCIES for more options. Any other options encountered generate a warning to standard error. Other arguments are taken to be HP aC++/ANSI C compatible object files, typically produced by an earlier aCC or cc run, or perhaps libraries of HP aC++/ANSI C compatible routines. These files, together with the results of any compilations specified, are linked (in the order given) to produce an executable program with the default name a.out. NOTES Pointers Accessing the object of a NULL (zero) pointer is technically illegal, but many systems have permitted it in the past. The following is provided to maximize portability of code. If the hardware is able to return zero for reads of location zero (when accessing at least 8- and 16-bit quantities), it must do so unless the -z flag is present. The -z flag requests that SIGSEGV be generated if an access to location zero is attempted. Writes of location zero may be detected as errors even if reads are not. If the hardware cannot assure that location zero acts as if it was initialized to zero or is locked at zero, the hardware should act as if the -z flag is always set. EXTERNAL INFLUENCES Environment Variables BROWSER specifies the HTML browser to use when +help invokes the HP aC++ Online Programmer's Guide or HP C Online Help. CXXOPTS and CCOPTS see DESCRIPTION above. SDKROOT and TARGETROOT see the appropriate Release Notes listed below. Hewlett-Packard Company - 19 - aC++/C Version A.06.00 aCC/cc(1) aCC/cc(1) Requires Optional aC++/ANSI C Compiler Software The aCC_MAXERR environment variable allows you to set the maximum number of errors you want the compiler to report before it terminates compilation. The default is 12. UNIX95 or UNIX_STD specify the XPG4 behavior for c89(1) and c99(1). -D_XOPEN_UNIX is also set. UNIX_STD must be set to 95 or 98. Both these variable cause an appropriate object file to be linked into executables in order to customize libc to match C Annex 1 and the C++ and C99 Standards for the various wide char functions. When set, the TMPDIR environment variable specifies a directory to be used for temporary files, overriding the default directory /var/tmp. When the -Y option is used, LC_CTYPE determines the interpretation of string literals and comments as single and/or multi-byte characters. LANG determines the language in which messages are displayed. If LC_CTYPE is not specified in the environment or is set to the empty string, the value of LANG is used as a default for each unspecified or empty variable. If LANG is not specified or is set to the empty string, a default of "C" (see lang(5)) is used instead of LANG. If any internationalization variable contains an invalid setting, aCC or cc behave as if all internationalization variables are set to "C". See environ(5). International Code Set Support Single- and multi-byte character code sets are supported. DIAGNOSTICS The diagnostics produced by the compiler itself are intended to be self-explanatory. Occasional messages may be produced by the assembler or the link editor. If any errors occur before aCC, cc, c89 or c99 completes, a non-zero value is returned. Otherwise, zero is returned. DEPENDENCIES The -g, -g0 and -g1 options are incompatible with optimization levels greater than 2. If both debug and optimization are specified, the debug option takes precedence. The -s option is incompatible with the -g, -g0, -g1, -G, and -p options. If -s is specified along with any of the above options, the -s option is ignored, regardless of the order in which the options were specified. The compiler supports the following additional options. +DDdata_model Generate code using either the ILP32 or LP64 data model. Defined values for data_model are: Hewlett-Packard Company - 20 - aC++/C Version A.06.00 aCC/cc(1) aCC/cc(1) Requires Optional aC++/ANSI C Compiler Software 32 Use the ILP32 data model. The sizes of the int, long and pointer data types are 32-bits. Defines _ILP32 to the preprocessor. 64 Use the LP64 data model. The size of the int data type is 32-bits, and the sizes of the long and pointer data types are 64-bits. Defines __LP64__ and _LP64 to the preprocessor. The default is +DD32. +DOosname This option sets the target operating system for the compiler and is intended for enabling optimizations that are not backward compatible. The recognized values for osname are 11.20, 11.22, and 11.23. +DOosname selects optimizations that are compatible with operating system version osname and later. The default value for osname is the operating system version on which the compiler is invoked. +DSmodel Use the instruction scheduler tuned to the model specified. The defined values for model are: blended Tune for the best performance on a combination of processors (i.e. Itanium, Itanium2, or native processor). itanium Tune for best performance on an Intel(R) Itanium(R) processor. itanium2 Tune for best performance on a Intel(R) Itanium(R) 2 processor. native Tune for best performance on the processor on which the compiler is running. The default model is blended. +Olevel Invoke optimizations selected by level. Defined values for level are: 0 Perform minimal optimizations. 1 Perform optimizations within basic blocks only. This is the default. Hewlett-Packard Company - 21 - aC++/C Version A.06.00 aCC/cc(1) aCC/cc(1) Requires Optional aC++/ANSI C Compiler Software 2 Perform level 1 and global optimizations. Enable automatic inlining. Same as -O. 3 Perform level 2 as well as interprocedural global optimizations within translation units. 4 Perform level 3 as well as doing interprocedural optimizations across translation units (link time optimizations). NOTE: Object files generated at this level contain an intermediate representation of the user code and are intended to be temporary files. These intermediate object files are not guaranteed to be compatible from one version of the compiler to the next. The following additional optimization options allow you to enable or disable specific optimization techniques: +Olevel=name1[,name2,...,nameN] Decrease the optimization to level for one or more specified functions. This option can occur at optimization levels 0, 1, 2, 3 or 4. The option cannot raise the optimization level above what was specified in the +Olevel option. This option can occur multiple times with different values of level. NOTE: Currently only the C++ mangled name of the function is allowed for name. +O[no]clone Influences cloning both in to and out of the functions it governs. This option is on by default with +O3 and +O4 level of optimization. +O[no]cross_region_addressing Enables [disables] the use of cross-region addressing. Cross-region addressing is required if a pointer (such as an array base) may point to a different region than the data being addressed, due to an offset which results in a cross-over into another region. Standard-conforming applications do not require the use of cross- region addressing. The default is +Onocross_region_addressing. +O[no]cxlimitedrange Enable [disable] the use of routines for complex multiply, divide, and absolute value that are faster but whose results are not specified in Hewlett-Packard Company - 22 - aC++/C Version A.06.00 aCC/cc(1) aCC/cc(1) Requires Optional aC++/ANSI C Compiler Software cases involving complex infinities and in cases involving extreme finite values of types wider than double. This is equivalent to the STDC CX_LIMITED_RANGE pragma except that it applies to a compilation unit as opposed to a declaration or statement. The default is +Onocxlimitedrange. +O[no]datalayout Enables [disables] profile-driven layout of global and static data items to improve cache memory utilization. This option is currently enabled if +Oprofile=use (dynamic profile feedback) is specified. The default in the absence of +Oprofile=use is +Onodatalayout. +O[no]dataprefetch Enable [disable] optimizations to generate data prefetch instructions for data structures referenced within innermost loops. +Odataprefetch is the same as +Odataprefetch=indirect. +Onodataprefetch is the same as +Odataprefetch=none. +Odataprefetch=kind Control generation of data prefetch instructions for data structures referenced within innermost loops. The defined values for kind are: direct Enable generation of data prefetch instructions for the benefit of direct memory accesses, but not indirect memory accesses. indirect Enable generation of data prefetch instructions for the benefit of both direct and indirect memory accesses. This is the default at optimization levels +O2 and above. none Disable generation of data prefetch instructions. This is the default at optimization levels +O1 and below. +O[no]failsafe Enable [disable] failsafe optimization. When a compilation fails at the current optimization level +Ofailsafe will automatically restart the compilation at +O2 (for specific high level optimizer errors +O3/+O4) or +O0. The default is Hewlett-Packard Company - 23 - aC++/C Version A.06.00 aCC/cc(1) aCC/cc(1) Requires Optional aC++/ANSI C Compiler Software +Ofailsafe. +Ofast This option selects a combination of compilation and link options for optimum execution speed and reasonable build times. Currently: +O2, +Onolimit, +Olibcalls, +Ofltacc=relaxed, +DSnative, +FPD, -Wl,+pi,4M, -Wl,+pd,4M and -Wl,+mergeseg. This option is a synonym for -fast. Some of the linker settings above can be changed with chatr(1). +Ofaster This option selects +Ofast, but with the optimization level increased to +O4 . +O[no]fenvaccess Informs the compiler that the program accesses [does not access] the floating point environment to test flags or run under non-default modes. If it knows that a program does not access the floating point environment, the compiler is allowed to perform certain optimizations that it otherwise may not perform, such as global common subexpression elimination, code motion, or constant folding. Using +Ofenvaccess is equivalent to adding #pragma STDC FENV_ACCESS ON at the beginning of each source file submitted for compilation. The default is +Onofenvaccess. +O[no]fltacc Disable [enable] floating-point optimizations that can result in numerical differences. +Ofltacc is the same as +Ofltacc=strict. +Onofltacc is the same as +Ofltacc=relaxed. +Ofltacc=level Controls the level of floating point optimizations that the compiler may perform. The defined values for level are: default Allows contractions, such as fused multiply-add (FMA), but disallows any other floating point optimization that can result in numerical differences. limited Like default, but also allows floating point optimizations which may affect the generation and propagation of infinities, NaNs, and the sign of zero. relaxed In addition to the optimizations allowed Hewlett-Packard Company - 24 - aC++/C Version A.06.00 aCC/cc(1) aCC/cc(1) Requires Optional aC++/ANSI C Compiler Software by limited, permits optimizations, such as reordering of expressions, even if parenthesized, that may affect rounding error. This is the same as +Onofltacc. strict Disallows any floating point optimization that can result in numerical differences. This is the same as +Ofltacc. The default is +Ofltacc=default. +Ofrequently_called=function1[,function2...] The named functions are assumed to be frequently called. +Ofrequently_called:filename The file indicated by filename contains a list of function names, separated by spaces or newlines. These functions are assumed to be frequently called. +O[no]info Provide [do not provide] feedback information about the optimization process. This option is most useful at optimization levels 3 and 4. The default is +Onoinfo. +O[no]initcheck Enable [disable] initialization to zero of any local, scalar, non-static variable that is uninitialized with respect to at least one path leading to its use. This optimization can occur at optimization levels 2, 3, and 4. The default is to enable initialization if the variable is uninitialized with respect to every path leading to its use. +O[no]inline Enable [disable] optimizer inlining for all functions in the compilation unit. This optimization can occur at optimization levels 3 and 4. The default is +Oinline. +O[no]inline=function1[,function2...] Enable [disable] optimizer inlining for the named functions. This optimization can occur at optimization levels 2 and above. The default is +Oinline. +O[no]inline:filename The file indicated by filename contains a list of Hewlett-Packard Company - 25 - aC++/C Version A.06.00 aCC/cc(1) aCC/cc(1) Requires Optional aC++/ANSI C Compiler Software function names, separated by spaces or newlines. This option enables [disables] optimizer inlining for the named functions. This optimization can occur at optimization levels 3 and 4. The default is +Oinline. +Oinlinebudget=n The +Oinlinebudget option controls the compile time budget for the inliner. A lower number causes the inliner to consider fewer candidates for inlining, while a higher number leads it to consider more candidates. The inlining candidates are ordered in priority order based on the inliner's heuristics, so this does not affect the most important candidates. n is an integer in the range 1 - 1000000 that specifies the level of aggressiveness as follows: n Meaning = 100 Default compile time budget. > 100 Allow the inliner to consider more candidates and increase compile time. 1 - 99 Restrict the inliner to consider fewer candidates to reduce compile time. This optimization can occur at optimization levels 3, and 4. The default is +Oinlinebudget=100. +Ointeger_overflow=type Controls the integer overflow assumptions made by the compiler to provide the best runtime performance. The defined values for type are: aggressive Allows the compiler to make a broad set of assumptions so that the integer arithmetic expressions do not overflow. The default. moderate This is the same as aggressive except that the LFTR (linear function test replacement) optimization is not performed. conservative Directs the compiler to make fewer assumptions so that the integer Hewlett-Packard Company - 26 - aC++/C Version A.06.00 aCC/cc(1) aCC/cc(1) Requires Optional aC++/ANSI C Compiler Software arithmetic expressions do not overflow. +O[no]libmerrno Enable [disable] support for errno in libm functions. The default is +Onolibmerrno. +Olit=level Controls which data items are placed in the read- only data section. The defined values for level are: all All string literals and all const- qualified variables that do not require load-time or run-time initialization will be placed in the read-only data section. +Olit=all replaces the deprecated +ESlit option. const All string literals appearing in a context where const char * is legal, and all const-qualified variables that do not require load-time or run-time initialization will be placed in the read-only data section. none No constants are placed in the read-only data section. +Olit=none replaces the deprecated +ESnolit option. The default is +Olit=all for C++ and +Olit=const for C. +O[no]loop_transform Transform [do not transform] eligible loops for improved cache and other performance. This option can be used at optimization levels 2, 3 and 4. The default is +Oloop_transform. +O[no]loop_unroll[=unroll_factor] Enable [disable] loop unrolling. This optimization can occur at optimization levels 2, 3, and 4. The default is +Oloop_unroll. The default is 4, that is, four copies of the loop body. The unroll_factor controls code expansion. +O[no]loop_unroll_jam Enable [disable] loop unrolling and jamming which increases register exploitation. The default is +Onoloop_unroll_jam at optimization levels 3 and 4. Hewlett-Packard Company - 27 - aC++/C Version A.06.00 aCC/cc(1) aCC/cc(1) Requires Optional aC++/ANSI C Compiler Software +O[no]openmp Allows [disallows] requests to honor OpenMP directives. Non OpenMP parallelization directives will be ignored with warnings. See HP aC++ Online Programmer's Guide for more information. NOTE: Currently +Oopenmp for C++ is only implemented when using +legacy_v5. +O[no]parminit Enables [disables] automatic initialization of unspecified function parameters at call sites to zero. This is useful for preventing NaT values in parameter registers. The default is +Onoparminit. +O[no]parmsoverlap Optimize with the assumption that subprogram arguments do [do not] refer to the same memory. This option can be used at optimization levels 2, 3, and 4. The default is +Oparmsoverlap. +Oprefetch_latency=cycles +Oprefetch_latency applies to loops for which the compiler generates data prefetch instructions. cycles must be in the range of 0 to 10000. A value of zero instructs the compiler to use the default value, which is 480 cycles for loops containing floating-point accesses and 150 cycles for loops that do not contain any floating-point accesses. See the HP aC++ Online Programmer's Guide or HP C Online Help. +O[no]procelim Enable [disable] the elimination of functions that are not referenced by the application. Only functions with the hidden export class may be eliminated. The default is +Onoprocelim at optimization levels 0 and 1; at levels 2, 3 and 4, the default is +Oprocelim. +Oprofile=use:filename Specify filename as the name of the profile database file. See also ld(1), +Oprofile=collect, and +Oprofile=use for more details. +Oprofile=collect[:] Instrument the application to enable collection of profile based optimization data. are a comma-separated list of profile collection qualifiers. The profile collection are: arc Enable collection of arc counts. Hewlett-Packard Company - 28 - aC++/C Version A.06.00 aCC/cc(1) aCC/cc(1) Requires Optional aC++/ANSI C Compiler Software dcache Enable collection of data cache misses. stride Enable collection of stride data. loopiter Enable collection of loop iteration counts. all Enable collection of all types of profile data. Equivalent to the command +Oprofile=collect:arc,dcache,stride,loopiter. This is the default. This option merely enables the application for collection of the various forms of profiling data. The environment variable PBO_DATA_TYPE controls the type of data collected at runtime. It may be set to one of the following values, which must be consistent with the +Oprofile=collect qualifiers used to create the application: arc_stride Collect stride and/or arc counts. This is the default if PBO_DATA_TYPE is not set. dcache Collect data cache miss metrics. Note that data cache miss metrics cannot be collected during the same run of an application as stride and/or arc data. +O[no]promote_indirect_calls Enable [disable] the promotion of indirect calls to direct calls. (Indirect calls occur with pointers to functions (and virtual calls for C++).) This option can be used at optimization levels 3 and 4. The default is +Onopromote_indirect_calls. When +O4 and +Oprofile=use are both in effect, +Opromote_indirect_calls is implied. +O[no]ptrs_to_globals[=list] This option tells the optimizer whether global variables are accessed [are not accessed] through pointers. The default is +Optrs_to_globals. The list form is not available in C++ mode. Hewlett-Packard Company - 29 - aC++/C Version A.06.00 aCC/cc(1) aCC/cc(1) Requires Optional aC++/ANSI C Compiler Software +Orarely_called=function1[,function2...] The named functions are assumed to be infrequently called. +Orarely_called:filename The file indicated by filename contains a list of function names, separated by spaces or newlines. These functions are assumed to be infrequently called. +O[no]recovery Generate [do not generate] recovery code for control speculation. The default is +Orecovery. NOTE: For code which writes to uncacheable memory which may not be properly identified as volatile, the +Orecovery option reduces the risk of incorrect behavior. +O[no]report[=report_type] Causes the compiler to display [not display] various optimization reports. +Oreport=loop produces the Loop Report. +Oreport=private produces the Loop Report and the Privatization Table, which provides information on loop variables that are privatized by the compiler. +Oreport=all produces all reports. The default is +Onoreport at optimization levels 3 and 4. +Oreusedir=path The +Oreusedir option specifies that the intermediate object files produced as a result of a +Oprofile=collect, +Oprofile=use or +O4 link are either saved in the directory tree at path or are reused from a previous link that used the +Oreusedir option. This can save considerable amount of time on the subsequent links. The default is to use TMPDIR and remove the temporary objects after each link. +Oshortdata[=size] All objects of size size bytes or smaller will be placed in the short data area, and references to such data will assume it resides in the short data area. Valid values of size are a decimal number between 8 and 4,194,304 (4Mb). If no size is specified, all data is placed in the short data area. The default is +Oshortdata=8. NOTE: Using a value that is too big or without the optional size, may give various linker "fixup" errors, if there is more than 4Mb of short data. Hewlett-Packard Company - 30 - aC++/C Version A.06.00 aCC/cc(1) aCC/cc(1) Requires Optional aC++/ANSI C Compiler Software +O[no]signedpointers Enable [disable] the treating of pointers as signed quantities. This optimization can occur at optimization levels 0, 1, 2, 3, and 4. The default is +Onosignedpointers. Note that this option is only supported in C. +O[no]store_ordering Preserve [do not preserve] the original program order for stores to memory that is potentially visible to multiple threads. This does not imply strong ordering. The default is +Onostore_ordering. +O[no]sumreduction Enables sum reduction optimization. Allows the compiler to compute partial sums when loop unrolling to allow faster computations. It is not technically legal to do this in C/C++ because of float accuracy issues. This option is useful if an application can not use +Onofltacc but wants sum reduction to be performed. +Otype_safety=[off|limited|ansi|strong] Enable [disable] aliasing across types. off The default. Specifies that aliasing can occur freely across types. This is a synonym to +Onoptrs_ansi and +Onoptrs_strongly_typed options in legacy cc. limited Code follows ANSI aliasing rules. Unnamed objects should be treated as if they had an unknown type. ansi Code follows ANSI aliasing rules, and unnamed objects should be treated the same as named objects. This option is synonym to +Optrs_ansi option in legacy cc. strong Code follows ANSI aliasing rules, except that accesses through lvalues of a character type are not permitted to touch objects of other types. This assumes that field addresses are not taken. This option is synonym to +Optrs_strongly_typed option in legacy Hewlett-Packard Company - 31 - aC++/C Version A.06.00 aCC/cc(1) aCC/cc(1) Requires Optional aC++/ANSI C Compiler Software cc. +O[no]volatile Enable [disable] the treating of all global variables as volatile quantities. This option can be used at optimization levels 1, 2, 3, and 4. The default is +Onovolatile. +Ovolatile=qualifier1[,qualifier2...] Has the effect of applying the specified qualifiers to all uses of volatile in the source. If used in conjunction with +Ovolatile, the qualifiers also apply to the implicit volatile declarations of global variables. The defined values for qualifier are: [__]unordered Suppress both run-time and compile-time memory access ordering restrictions for volatile object references. If used to qualify a type declaration for a volatile object, the ordered completer will be omitted on referencing loads and stores. [__]side_effect_free Denotes that accessing a volatile object does not trigger external side-effects. If used to qualify a type declaration for a volatile object, memory references to that object may be scheduled by the compiler into code locations on a speculative basis. [__]synchronous Turn off the default of asynchronous access to a volatile object. if used to qualify a type declaration for a volatile object, memory references to that object may be deleted or replaced by a registered reference. [__]non_sequential Denotes that sequential execution semantics are not preserved for a a volatile object. If used to qualify a type declaration for a volatile object, memory references to that object may be reordered relative to other non- sequential memory references. Hewlett-Packard Company - 32 - aC++/C Version A.06.00 aCC/cc(1) aCC/cc(1) Requires Optional aC++/ANSI C Compiler Software +O[no]whole_program_mode Assert [do not assert] that files compiled with this option directly reference only those global variables and procedures that are defined in these files. This optimization can occur at optimization level 4. The default is +Onowhole_program_mode. The following "pre-packaged" optimization options allow you to enable or disable groups of optimization techniques: +O[no]limit Suppress [do not suppress] optimizations that significantly increase compile-time or consume enormous amounts of memory. +Olimit is the same as +Olimit=min. +Onolimit is the same as +Olimit=none. +Olimit=level Controls the amount of compile-time spent performing optimization. The defined values for level are: default Based on tuning heuristics, the optimizer will spend a reasonable amount of time processing large procedures. min For large procedures, the optimizer will avoid non-linear time optimizations. none The optimizer will fully optimize large procedures, possibly resulting in significantly increased compile time. The default is +Olimit=default. +O[no]size Suppress [do not suppress] optimizations that significantly increase code size. These optimizations can occur at levels 2, 3, and 4. The default is +Onosize. FILES file.[c/C] C/C++ input file (other suffixes are also supported) file.i previously preprocessed C++ or C input file file.o object file file.so shared library, created with -b a.out linked executable output file /var/tmp/* temporary files used by the compiler /opt/langtools/lbin/cpp compatibility preprocessor, to assemble .s files Hewlett-Packard Company - 33 - aC++/C Version A.06.00 aCC/cc(1) aCC/cc(1) Requires Optional aC++/ANSI C Compiler Software /opt/langtools/lbin/cpp.ansi ANSI preprocessor, to assemble .s files or when -tp is used /usr/ccs/bin/as assembler, as(1) /usr/ccs/bin/ld link editor, ld(1) /opt/langtools/lbin/u2comp stand-alone code generator /opt/ansic/bin/cc C compiler, cc(1) Non-aC++ Libraries /usr/lib/hpux[32|64]/libc.so standard C library (shared version), see HP-UX Reference Section (3). /usr/lib/hpux[32|64]/libm.a Math Library /usr/lib/hpux[32|64]/libm.so shared version of Math Library /usr/lib/hpux[32|64]/libunwind.so shared version of Unwind library /usr/lib/hpux[32|64]/libdl.so Dynamic loader library /usr/lib/hpux[32|64]/dld.so Dynamic loader aC++ Files /opt/aCC/bin/aCC aC++ driver /opt/aCC/bin/c++filt C++ name filter tool, c++filt(1) /opt/aCC/bin/nm++ C++ name filter tool for object files, nm++(1) /opt/aCC/html/$LANG directory for online help files /opt/aCC/lbin/ctcom compiler v5 /opt/aCC/lbin/ecom compiler v6 /opt/aCC/include directory for standard C++ headers -AP /opt/aCC/include_std directory for standard C++ headers -AA /opt/aCC/include*/rw directory for Tools.h++ headers /opt/aCC/include/iostream directory for cfront compatible iostream headers /opt/aCC/include_std/iostream_compat directory for iostream .h style headers to port to new lib -AA /opt/aCC/lib/nls/msg/$LANG/aCC.cat aC++ compiler message catalog v5 /opt/aCC/lib/nls/msg/$LANG/aCC.msgs aC++ compiler message catalog with CAUSE and ACTION v5 /opt/aCC/lib/nls/msg/$LANG/ecc.cat aC++ compiler message catalog v6 /opt/aCC/share/man aC++ compiler, library and tools man pages ANSI C compiler Files /opt/ansic/bin/cc C driver /opt/ansic/html/$LANG directory for online help files /opt/ansic/lbin/ctcom C compiler v5 /opt/ansic/lbin/ecom C compiler v6 /opt/ansic/lib/nls/msg/$LANG/aCC.cat C compiler message catalog v5 Hewlett-Packard Company - 34 - aC++/C Version A.06.00 aCC/cc(1) aCC/cc(1) Requires Optional aC++/ANSI C Compiler Software /opt/ansic/lib/nls/msg/$LANG/aCC.msgs C compiler message catalog with CAUSE and ACTION v5 /opt/aCC/lib/nls/msg/$LANG/ecc.cat aC++ compiler message catalog v6 /opt/ansic/share/man C compiler man pages aC++ Libraries /usr/lib/hpux[32|64]/libCsup.a C++ runtime support library /usr/lib/hpux[32|64]/libCsup.so C++ runtime support library (shared version) /usr/lib/hpux[32|64]/libstd.a standard C++ library -AP /usr/lib/hpux[32|64]/libstd.so standard C++ library (shared version) -AP /usr/lib/hpux[32|64]/libstd_v2.a standard C++ library -AA /usr/lib/hpux[32|64]/libstd_v2.so standard C++ library (shared version) -AA /usr/lib/hpux[32|64]/librwtool.a Rogue Wave Tools.h++ library -AP /usr/lib/hpux[32|64]/librwtool.so Rogue Wave Tools.h++ library (shared version) -AP /usr/lib/hpux[32|64]/libstream.a cfront compatible iostream library -AP /usr/lib/hpux[32|64]/libstream.so cfront compatible iostream library (shared version) -AP C++ Examples /opt/aCC/contrib/Examples aC++ Online Documentation /opt/aCC/newconfig/RelNotes/ACXX.release.notes HP aC++ Release Notes /opt/aCC/html/$LANG/templates/templates.htm Using Templates in HP aC++ /opt/aCC/newconfig/TechDocs/templates.ps Using Templates in HP aC++ /opt/aCC/newconfig/TechDocs/64bitTrans.bk.ps HP-UX 64-bit Porting and Transition Guide /opt/aCC/html/libstd/ref.htm Rogue Wave Software Standard C++ Library Class Reference /opt/aCC/html/libstd_v2/stdref/index.htm Rogue Wave Software Standard C++ 2.0 Library Class Reference Hewlett-Packard Company - 35 - aC++/C Version A.06.00 aCC/cc(1) aCC/cc(1) Requires Optional aC++/ANSI C Compiler Software /opt/aCC/html/libstd_v2/stdug/index.htm Rogue Wave Software Standard C++ 2.0 Library Class User's Guide /opt/aCC/html/librwtool/ref.htm Rogue Wave Software Tools.h++ 7.0 Class Reference /opt/aCC/html/librwtool_v2/index.html Rogue Wave Software Tools.h++ 7.1.1 Class Reference SEE ALSO Online help: The +help option will display online help using a default HTML browser, or you can invoke your own HTML browser with the URL file:/opt/aCC/html/$LANG/guide/index.htm for aCC or file:/opt/cc/html/$LANG/guide/index.htm for cc. Alternatively, setting the BROWSER environment variable will override the default HTML browser. Other topics available are: Compiler Pragmas, predefined Preprocessing Symbols, Floating Installation, cfront to aC++ Migration Guide and Implementation Defined aspects of the compiler. Information is also available on the web at: http://www.hp.com/go/c++ for C++ and http://www.hp.com/go/c for C. C++ tools: c++filt(1) C++ name filter tool nm++(1) C++ name filter tool for nm(1) See above man page directories for other possible topics. Profiling and debugging tools: caliper(1) C, C++, Fortran performance analysis tool for applications gprof(1) display call graph profile data monitor(3C) prepare execution profile wdb(1) C and C++ symbolic debugger gdb(1) C and C++ symbolic debugger adb(1) absolute debugger System tools: as(1) translate assembly code to machine code cpp(1) invoke the the C language preprocessor cc(1) C compiler ld(1) invoke the link editor Miscellaneous: strip(1) strip symbol and line number information from an object file chatr(1) change program's internal attributes Hewlett-Packard Company - 36 - aC++/C Version A.06.00 aCC/cc(1) aCC/cc(1) Requires Optional aC++/ANSI C Compiler Software crt0(3) execution startup routine end(3C) symbol of the last locations in program exit(2) termination of a process Tutorials and Standards Documents: The C++ Programming Language, Third Edition, by Bjarne Stroustrup (ISBN 0-201-88954-4) C++ Solutions: Companion to the C++ Programming Language, Third Edition, by David Vandevoorde (ISBN 0-201-30965-3) STL Tutorial & Reference Guide: C++ Programming with the Standard Template Library, by David R. Musser R. and Atul Saini (ISBN 0-201-633-981) ISO/IEC 14882-1998 - Programming Languages C++. American National Standard for Information Systems - Programming language C, ANS X3.159-1989. C/C++ Annotated Archives, by Art Friedman, Lars Klander, Mark Michaelis and Herb Schildt (ISBN 0-07-882504-0) See the Information Map in the HP aC++ Online Programmer's Guide. Hewlett-Packard Company - 37 - aC++/C Version A.06.00 END