About This Manual

This manual contains a summary of the syntax and semantics of the C programming language as implemented on SGI workstations. It documents previous releases of the SGI C compiler as well as the American National Standards Institute (ANSI) C compiler.

The SGI compiler system supports three modes of compilation: the old 32-bit mode (-o32 or -32 option), the new 32-bit mode (-n32 option), and the 64-bit mode (-64 option).

For information on compilation modes and general compiler options for the old 32-bit mode, see the o32(5) man page and the MIPS O32 Compiling and Performance Tuning Guide.

For information on the new 32-bit mode and 64-bit mode, see the cc(1) man page and the MIPSpro N32/64 Compiling and Performance Tuning Guide.

The term “traditional C” refers to the dialect of C described in the first edition of The C Programming Language by Kernighan and Ritchie.

Related Publications

The following documents contain information that may be helpful in porting code to the newer SGI compilers:

  • MIPS O32 Compiling and Performance Tuning Guide

  • MIPSpro N32/64 Compiling and Performance Tuning Guide

  • MIPSpro N32 ABI Handbook

  • MIPSpro 64-Bit Porting and Transition Guide

The following documents contain information about SGI's implementation of C and C++:

  • C++ Programmer's Guide

  • MIPSpro C and C++ Pragmas

Several performance evaluation and debugging tools are available to help you optimize and evaluate your code. See the ProDev WorkShop: Overview for a description of the different tools that are available.

See the Guides to SGI Compilers and Compiling Tools for an overview of all SGI compilers, compiler documentation, optimization tools, porting tools, and performance tools.

In addition to the above SGI documentation, several third party documents contain additional information which may be helpful. These books can be ordered from any book vendor:

  • Ellis, Margaret A., and Bjarne Stroustrup. The Annotated C++ Reference Manual. Addison-Wesley Publishing Company, 1990. ISBN 0201514591.

  • Josuttis, Nicolai. The C++ Standard Library: A Tutorial and Reference. Addison-Wesley Publishing Company, 1999. ISBN 0201379260.

  • Kernighan, Brian W. and Dennis M. Ritchie. The C Programming Language. Prentice-Hall, 1988. ISBN 0131103628.

Obtaining Publications

You can obtain SGI documentation in the following ways:

  • See the SGI Technical Publications Library at http://docs.sgi.com. Various formats are available. This library contains the most recent and most comprehensive set of online books, release notes, man pages, and other information.

  • If it is installed on your SGI system, you can use InfoSearch, an online tool that provides a more limited set of online books, release notes, and man pages. With an IRIX system, select Help from the Toolchest, and then select InfoSearch. Or you can type infosearch on a command line.

  • You can also view release notes by typing either grelnotes or relnotes on a command line.

  • You can also view man pages by typing man title on a command line.


The following conventions are used throughout this document:




This fixed-space font denotes literal items such as commands, files, routines, path names, signals, messages, and programming language structures.


Italic typeface denotes variable entries and words or concepts being defined.

user input 

This bold, fixed-space font denotes literal items that the user enters in interactive sessions. (Output is shown in nonbold, fixed-space font.)

[ ] 

Brackets enclose optional portions of a command or directive line.


Ellipses indicate that a preceding element can be repeated.

Reader Comments

If you have comments about the technical accuracy, content, or organization of this publication, contact SGI. Be sure to include the title and document number of the publication with your comments. (Online, the document number is located in the front matter of the publication. In printed publications, the document number is located at the bottom of each page.)

You can contact SGI in any of the following ways:

  • Send e-mail to the following address:

    [email protected]

  • Use the Feedback option on the Technical Publications Library Web page:


  • Contact your customer service representative and ask that an incident be filed in the SGI incident tracking system.

  • Send mail to the following address:

    Technical Publications
    1600 Amphitheatre Parkway, M/S 535
    Mountain View, California 94043-1351

  • Send a fax to the attention of “Technical Publications” at +1 650 932 0801.

SGI values your comments and will respond to them promptly.