Skip Navigation Links | |
Exit Print View | |
![]() |
Oracle Solaris Studio 12.3: C User's Guide Oracle Solaris Studio 12.3 Information Library |
1. Introduction to the C Compiler
2. C-Compiler Implementation-Specific Information
7. Converting Applications for a 64-Bit Environment
8. cscope: Interactively Examining a C Program
A. Compiler Options Grouped by Functionality
B. C Compiler Options Reference
B.2.7 -Dname[(arg[,arg])][=expansion]
B.2.19.1 --features=typeof Examples
B.2.59 -Qoption phase option[,option..]
B.2.65 -traceback[={%none|common|signals_list}]
B.2.79.1 -xarch Flags for SPARC and x86
B.2.79.2 -xarch Flags for SPARC
B.2.82 -xbuiltin[=(%all|%default|%none)]
B.2.89.1 Initialization Values for -xcheck=init_local
Initializing Structs, Unions, and Arrays
B.2.94 -xdebugformat=[stabs|dwarf]
B.2.97 -xdumpmacros[=value[,value...]]
B.2.103 -xinstrument=[no%]datarace
B.2.104.2 When Not To Use -xipo=2 Interprocedural Analysis
B.2.108 -xkeepframe[=[%all,%none,name,no%name]]
B.2.130.2 x86 Optimization Levels
B.2.136.1 Creating a Precompiled-Header File Automatically
B.2.136.2 Creating a Precompiled-Header File Manually
B.2.136.3 How the Compiler Handles an Existing Precompiled-Header File
B.2.136.4 Directing the Compiler to Use a Specific Precompiled-Header File
B.2.136.6 Screening a Header File for Problems
B.2.136.7 Precompiled-Header File Cache
B.2.136.9 Precompiled-Header File Dependencies and make Files
B.2.137 -xpchstop=[file|<include>]
B.2.141 -xprefetch[=val[,val]]
B.2.141.1 Prefetch Latency Ratio
B.2.142 -xprefetch_auto_type=a
B.2.145 -xprofile_ircache[=path]
B.2.155.1 -xtarget Values on SPARC Platforms
B.2.155.2 -xtarget Values on x86 Platforms
B.2.160 -xtrigraphs[={yes|no}]
B.2.162 -xustr={ascii_utf16_ushort|no}
B.3 Options Passed to the Linker
B.4 User-Supplied Default Options File
C. Implementation-Defined ISO/IEC C99 Behavior
E. Implementation-Defined ISO/IEC C90 Behavior
H. Oracle Solaris Studio C: Differences Between K&R C and ISO C
The syntax of the cc command is:
% cc [options] filenames [libraries]...
where:
options represents one or more of the options described in Table A-14.
filenames represents one or more files used in building the executable program
The C compiler accepts a list of C source files and object files contained in the list of files specified by filenames. The resulting executable code is placed in a.out, unless the -o option is used. In this case, the code is placed in the file named by the -o option.
Use the C compiler to compile and link any combination of the following:
C source files, with a .c suffix
Inline template files, with a .il suffix (only when specified with .c files)
C preprocessed source files, with a .i suffix
Object-code files, with .o suffixes
Assembler source files, with .s suffixes
After linking, the C compiler places the linked files, now in executable code, into a file named a.out, or into the file specified by the -o option. When the compiler produces object code for each .i or .c input file, it always creates an object (.o) file in the current working directory.
libraries represents any of a number of standard or user-provided libraries containing functions, macros, and definitions of constants.
Use the option -YP, dir to change the default directories used for finding libraries. dir is a colon-separated path list. The default library search order can be seen by using the -### or -xdryrun option and examining the -Y option of the ld invocation.
cc uses getopt to parse command-line options. Options are treated as a single letter or a single letter followed by an argument. See thegetopt(3c) man page.