Table C-1. HP-UX ANSI cc and gcc Compiler Switches Comparison Table
HP cc Option
GNU gcc Option
Specifies the degree of ANSI compliance.
Performs the same operation as +Oextern=sym1,sym2,sym3... except that symbols are loaded from an existing file, instead of specified on the command line.
Hides all the symbols including references except for those prefixed with__declspec(dllexport), __declspec(dllimport).
Hides all the symbols defined in the module except for those prefixed with__declspec(dllexport).
Compiles only; does not link.
Prevents the preprocessor from stripping comments.
| || |
| || |
or use lcma (for user threads)
Compiling with threads.
Defines the preprocessor variable name with a value of 1.
Defines the preprocessor variable name with a value of def.
Enables linking of PIC objects.
Performs preprocessing only with output to stdout.
Expands into a set of compiler options, which results in improved application runtime. Options included are +O3, +Onolooptransform, +Olibcalls, +FPD, +Oentryschedule, and +Ofastaccess. Any of these options can be overridden by placing a subsequent option after -fast on the command line.
Inserts information for the symbolic debugger in the object file.
Inserts information required by the gprof profiler in the object file.
Inserts dir in the include file search path.
Links with the libx.a depending on default library paths.
Links the libraries in dir before the libraries in the default search path. Adds default linker paths to one specified in the L option before searching the default system library directories.
-Wl specifies a flag to pass on to the linker. In this case, the L flag is passed on. This has the same effect as the L option.
Generates shareable code.
Generates unshareable code.
Creates statically bound executables.
Places object modules in file outfile.
Optimizes at level 2.
Inserts information required by the prof profiler in the object file.
Performs preprocessing only with output to the corresponding .i file.
Marks the executable as demand-loadable.
Marks the executable as not being demand-loadable.
Strips the symbol table from the executable file.
Generates an assembly language source file.
Substitutes or inserts subprocess x with name.
Undefines name in the preprocessor.
Enables verbose mode.
Shows each invoked component; does not execute.
Causes subprocesses to print version information to stderr.
Suppresses warning messages.
-Wd,-a or +a
Omits HP-provided prefix files required by the linker.
-Wx, arg1 [,arg2,..,argn]
Passes the arguments to subprocess x.
Generates information used by the HP SoftBench static analysis tool.
Enables Native Language Support (NLS).
Default (also see -fno-delete-null-pointer-checks-fdelete-null-pointer-checks)
Disallows runtime dereferencing of null pointers.
Allows dereferencing of null pointers at runtime.
-b machine moptions (if GCC is set up as a cross-compiler)
Generates object code for a specific version of the PA-RISC architecture. In the case of GCC, whichever platform it is is set up for cross-compiling.
Generates code for portable or embedded applications.
Generates 32-bit code for PA1.1 architecture.
Generates x-bit code for PA2.0 architecture.
Specifies the profile database to use with profile-based optimization.
Performs instruction scheduling for a specific implementation of PA-RISC.
Sets the target operating system for the compiler.
Enables the following HP value-added features while compiling in ANSI C mode: sized enum, long long, long pointers, compiler-supplied defaults for missing arguments to intrinsic calls, and $ in identifier HP C extensions.
Introduces new default behavior. HP C now stores constant-qualified (const) objects and literals in read-only memory.
Compiles with inline fast indirect calls.
Places string literals and constants into read-only data storage.
Disables +ESconstlit, causing HP C to no longer store literals in read-only memory.
Disables parameter relocation for function calls.
Replaces function pointer comparison millicode calls with inline code.
Inhibits the promotion of float to double, except for function calls and returns.
+FPflags Example: +FPVZO
Controls floating-point traps.
Launches a Web browser displaying an HTML version of the HP C/HP-UX online help.
Lowers the threshold for huge data.
Prepares the object code for profile-based optimization data collection.
Generates long-displacement code sequences so a program can reference large amounts of global data physically located in shared libraries.
Enables any #pragma listing directives and the listing facility.
Prints identifier maps in the source code listing.
Prints hexadecimal code offsets in the source code listing.
When used with -g, +objdebug leaves debug information in the object files.
Invokes optimization level.
Performs profile-based optimization.
Specifies the execution profile data set to be used by the optimizer.
Inhibits the automatic promotion of float to double.
Makes bit-fields signed by default in both 32- and 64-bit modes.
-falign-labels=n (align branch targets to a power of 2 boundary)
Controls pointer alignment where bytes is 1, 2, or 4.
Makes unqualified char data types unsigned.
-Woptions (close equivalent) -Wall (turns on all warning messages)
Specifies the level of the warning messages where n is 13 (HP-UX).
-Wnooptions (close equivalent)
Suppresses the specified warnings.
-Werror (all warnings, close equivalent)
Changes the specified warnings to errors.
-Woptions (close equivalent)
Enables the specified warnings, assuming all other warnings are suppressed with -w or +w3.
Generates shared library object code (same as +Z in 64-bit mode).
Generates shared library object code with a large data linkage table (long-form PIC).