JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Solaris Studio 12.2: C User's Guide
search filter icon
search icon

Document Information


1.  Introduction to the C Compiler

2.  C-Compiler Implementation-Specific Information

2.1 Constants

2.1.1 Integral Constants

2.1.2 Character Constants

2.2 Linker Scoping Specifiers

2.3 Thread Local Storage Specifier

2.4 Floating Point, Nonstandard Mode

2.5 Labels as Values

2.6 long long Data Type

2.6.1 Printing long long Data Types

2.6.2 Usual Arithmetic Conversions

2.7 Case Ranges in Switch Statements

2.8 Assertions

2.9 Supported Attributes

2.10 Warnings and Errors

2.11 Pragmas

2.11.1 align

2.11.2 c99

2.11.3 does_not_read_global_data

2.11.4 does_not_return

2.11.5 does_not_write_global_data

2.11.6 error_messages

2.11.7 fini

2.11.8 hdrstop

2.11.9 ident

2.11.10 init

2.11.11 inline

2.11.12 int_to_unsigned

2.11.13 MP serial_loop

2.11.14 MP serial_loop_nested

2.11.15 MP taskloop

2.11.16 nomemorydepend

2.11.17 no_side_effect

2.11.18 opt

2.11.19 pack

2.11.20 pipeloop

2.11.21 rarely_called

2.11.22 redefine_extname

2.11.23 returns_new_memory

2.11.24 unknown_control_flow

2.11.25 unroll

2.11.26 warn_missing_parameter_info

2.11.27 weak

2.12 Predefined Names

2.13 Preserving The Value of errno

2.14 Extensions

2.14.1 _Restrict Keyword

2.14.2 __asm Keyword

2.14.3 __inline and __inline__

2.14.4 __builtin_constant_p()


2.15 Environment Variables









2.15.9 TMPDIR

2.16 How to Specify Include Files

2.16.1 Using the -I- Option to Change the Search Algorithm Warnings

2.17 Compiling in Free-Standing Environments

3.  Parallelizing C Code

4.  lint Source Code Checker

5.  Type-Based Alias Analysis

6.  Transitioning to ISO C

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

C.  Implementation-Defined ISO/IEC C99 Behavior

D.  Supported Features of C99

E.  Implementation-Defined ISO/IEC C90 Behavior

F.  ISO C Data Representations

G.  Performance Tuning

H.  The Differences Between K&R Solaris Studio C and Solaris Studio ISO C


2.14 Extensions

The C compiler implements a number of extensions to the C language.

2.14.1 _Restrict Keyword

The C compiler supports the _Restrict keyword as an equivalent to the restrict keyword in the C99 standard. The _Restrict keyword is available with -xc99=none and -xc99=all, whereas the restrict keyword is only available with -xc99=all.

For more information on supported C99 features, see Table C-6.

2.14.2 __asm Keyword

The __asm keyword (note the initial double-underscore) is a synonym for the asm keyword. If you use asm, rather than __asm, and compile in -Xc mode, the compiler issues a warning. The compiler does not issue a warning if you use __asm in –Xc mode. The __asm statement has the form:


where string is a valid assembly language statement.

The statement emits the given assembler text directly into the assembly file. A basic asm statement declared at file scope, rather than function scope, is referred to as a global asm statement. Other compilers refer to this as a toplevel asm statement.

Global asm statements are emitted in the order they are specified. That is, they retain their order relative to each other and maintain their position relative to surrounding functions.

At higher optimization levels, the compiler may remove functions that it believes are not referenced. Since the compiler will not know which functions are referenced from within global asms, it is possible that they may be removed inadvertently.

Note that extended asm statements, those which provide a template and operand specifications, are not allowed to be global. __asm and __asm__ are synonyms for the asm keyword and can be used interchangeably.

2.14.3 __inline and __inline__

__inline and __inline__ are synonyms for the inline keyword (C standard, section 6.4.1)

2.14.4 __builtin_constant_p()

__builtin_constant_p is a compiler builtin function. It takes a single numeric argument and returns 1 if the argument is known to be a compile-time constant. A return value of 0 means that the compiler can not determine that the argument is a compile-time constant or not. A typical use of this builtin function is in manual compile-time optimizations in macros.


__FUNCTION__ and __PRETTY_FUNCTION__ are predefined identifiers that contain the name of the lexically-enclosing function. They are functionally equivalent to the c99 predefined identifier, __func__. On Solaris platforms, __FUNCTION__ and __PRETTY_FUNCTION__ are not available in -Xs and -Xc modes.