Previous Next Contents Index Doc Set Home


Introduction to the C Compiler

1


This chapter provides information on the C compiler, including operating environments, standards conformance, organization of the compiler, and C-related programming tools.


Operating Environments

For an explanation of the specific operating environments supported in this release, refer to the README file.


Standards Conformance

The compiler conforms to the American National Standard for Programming Language - C, ANSI/ISO 9899-1990. It also conforms to FIPS 160. Because the compiler also supports traditional K&R C (Kernighan and Ritchie, or pre-ANSI C), it can ease your migration to ANSI C.


Organization of the Compiler

The C compilation system consists of a compiler, an assembler, and a link editor. The cc command invokes each of these components automatically unless you use command-line options to specify otherwise.

Chapter 2, "cc Compiler Options," discusses all the options available with cc.

Figure 1-1 shows the organization of the C compilation system.

Figure  1-1 Organization of the C Compilation System
Table 1-1 summarizes the components of the compilation system.

Table  1-1 Components of the C Compilation System 
Component
Description
Notes on Use
cpp

Preprocessor

-Xs
acomp

Compiler (preprocessor built in for non-Xs modes)

--

iropt

Code optimizer

(SPARC) -O,
-xO [2-5], -fast

cg386

Intermediate language translator

(Intel) Always invoked

cgppc

Intermediate language translator

(PowerPC) Always invoked

inline

Inline expansion of assembly language templates

.il file specified

mwinline

Automatic inline expansion of functions

(Intel) (PowerPC)
-xO4, -xinline

fbe

Assembler

--

cg

Code generator, inliner, assembler

(SPARC)

codegen

Code generator

(Intel) (PowerPC)

ld

Linker

--

ild

Incremental linker

(SPARC) -g,
-xildon

The C compiler optimizer removes redundancies, optimally allocates registers, schedules instructions, and reorganizes code. Select from multiple levels of optimization to obtain the best balance between application speed and use of memory.


C-Related Programming Tools

There are a number of tools available to aid in developing, maintaining, and improving your C programs. The two most closely tied to C, cscope and lint, are described in this book. Others are described in the Solaris reference or programming documentation and/or Performance Profiling Tools. In addition, a man page exists for each of these tools. Refer to the preface of this book for a list of all the associated man pages.


Previous Next Contents Index Doc Set Home