Section C.2. HP-UX and Linux C Compiler Options Table


C.2. HP-UX and Linux C++ Compiler Options Table

Table C-2. HP-UX aCC and g++ Compiler Switches Comparison Table

HP aCC Option[3]

GNU g++ Option[4]

Description

-.suffix

None

The suffix parameter represents the character or characters to be used as the output filename suffix.

-Aa

-ansi -std=standard

Instructs the compiler to use Koenig lookup and strict ANSI for scope rules.

-AA

-std=c++98 (close option found)

Conforms to the ISO C++ standard.

-AC89

-std=c89

Invokes the compiler in ANSI C89 compilation mode.

-AC99

-std=c99[5] (also invoke pendantic flag to receive all diagnostics)

Invokes the compiler in ANSI C99 compilation mode with its features.

-Ae

-std=gnu89

Invokes as an ANSI C compiler, with additional support for HP C or GNU language extensions.

-AOa -AOe

-std=iso9899:1990 -std=iso9899:199409 (invoke with Ox flag for optimization options)

In addition to specifying the ANSI C language dialect, allows the optimizer to aggressively exploit the assumption that the source code conforms to the ANSI programming language C standard ISO 9899:1990.

-AP

None

Turns off -AA mode and uses the older C++ runtime libraries.

-b

None

Creates a shared library rather than an executable file.

-c

-c

Compiles one or more source files but does not enter the linking phase.

-C

-C

Prevents the preprocessor from stripping comments.

-dynamic

-Wl,-Bdynamic

Produces dynamically bound executables.

-Dname[=def]

-Dname=def

Defines a symbol name (name) to the preprocessor, as if defined by the preprocessing directive #define.

+d

-fno-default- inline (close but not exact)

Prevents the expansion of inline functions.

 

-fno-inline

 

+dryrun

-###

Displays the options passed, but does not execute.

-ext +e

None

Enables platform-dependent C++ standards extensions.

-E

-E

Runs only the preprocessor on the named C++ files and sends the result to standard output (stdout).

-fast

None

Selects a combination of optimization options for optimum execution speed for reasonable build times.

-fpeval= precision

None

Specifies the minimum precision to use for floating-point expression evaluation.

-g[0|1]

-g[1|2|3]

Emits different levels of debug information.

-G

-pg

Compiles and creates the executable file instrumented for use with gprof.

-Idirs -I-

-I

Indicates an optional list of -Idirectory specifications.

-mt

D_REENTRANT -lpthread

Compiles multithreaded.

-n

-shared -Bshareable

Causes the program file produced by the linker to be marked as sharable.

-N

None

Causes the program file produced by the linker to be marked as unsharable.

-o outfile

-o outfile

Causes the output of the compilation to be placed in outfile.

-O

-O2

Invokes the optimizer to perform level 2 optimizations.

-p

-p

Compiles and creates the executable file instrumented for use with prof.

-P

None

Only preprocesses the files named on the command line without invoking further phases. Leaves the result in corresponding files with the suffix .i.

-q

None

Causes the output file from the linker to be marked as demand-loadable.

-Q

None

Causes the program file from the linker to be marked as not demand-loadable.

-r

-r

Retains relocation information in the output file for subsequent relinking.

-s

-Wl,-s

Causes the executable program file created by the linker to be stripped of symbol table information.

-S

-S

Compiles the named program and leaves the assembly language output in a corresponding file with an .s suffix.

-Uname

-u -undefined=symbol

name is the symbol name whose definition is removed from the preprocessor.

-v

-v

Enables verbose mode, sending a step-by-step description of the compilation process to stderr.

-V-version

--version

Displays the version numbers of the current compiler and linker (if the linker is executed).

-w

-w

Suppresses all warning messages.

-Wc,-ansi_for_scope,[on][off]

-ffor-scope-fno-for-scope

Enables or disables the standard scoping rules for init declarations in for statements.

-Wc,-koenig_lookup,[on][off]

None

Enables or disables standard argument-dependent lookup rules (also known as Koenig lookup).

-Wx,arg1 [,arg2,..,argn]

-Wx,arg1 [,arg2,..,argn]

Passes the arguments arg1 through argn to the subprocess x of the compilation.

-Y

None

Enables Native Language Support (NLS) of 8-bit, 16-bit, and 4-byte EUC characters in comments, string literals, and character constants.

-z

Default

Disallows dereferencing of null pointers at runtime.

-Z

None

Allows dereferencing of null pointers at runtime.

+help

None

Invokes the initial menu window of HP aC++ Online Programmer's Guide.

+ild

-Wl,-i

Specifies incremental linking.

+noeh

None

Disables exception handling.

+nostl

None

Eliminates references to the standard header files and libraries bundled with HP aC++.

+O[no]initcheck

-Wuninitialized -O

The initialization checking feature.

+sb

None

Specifies unqualified char/short/int/ long/long long bitfields as signed.

+tls=[static|dynamic]

-ftls-model=model

Specifies whether references to thread local data items are to be performed according to the mode.

+ub

None

Specifies unqualified char/short/int/ long/long long bitfields as unsigned.

+uc

None

Specifying +uc causes an unqualified (plain) char data type to be treated as unsigned char.

+Warg1 [,arg2,..argn]

None

Selectively suppresses any specified warning messages, where arg1 through argn are valid compiler warning message numbers.

+We

-Werror

Interprets all warning and future error messages as errors.

+Wearg1 [,arg2,..argn]

None

Selectively interprets any specified warning or future error messages as errors. arg1 through argn are valid compiler warning message numbers.

+Wwarg1 [,arg2,..argn]

None

Selectively treats compiler warnings as warnings. arg1 through argn are valid compiler message numbers.

-Wl,+FPVZO

None

Hardware trap FPEs.


[3] HP aC++ Version A.05.50 Programmer's Guide (HP-UX 11i v2) (http://docs.hp.com/hpux/onlinedocs/4310/index.htm)

[4] GNU Compiler Collections version 3.4.2 (last updated May 23, 2004)

[5] GCC has incomplete support for C99. See http://gcc.gnu.org/gcc-3.4/c99status.html.




UNIX to Linux Porting. A Comprehensive Reference
UNIX to Linux Porting: A Comprehensive Reference
ISBN: 0131871099
EAN: 2147483647
Year: 2004
Pages: 175

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net