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
2.3 Thread Local Storage Specifier
2.4 Floating Point, Nonstandard Mode
2.6.1 Printing long long Data Types
2.6.2 Usual Arithmetic Conversions
2.7 Case Ranges in Switch Statements
2.11.3 does_not_read_global_data
2.11.5 does_not_write_global_data
2.11.26 warn_missing_parameter_info
2.13 Preserving the Value of errno
2.16 How to Specify Include Files
2.16.1 Using the -I- Option to Change the Search Algorithm
2.17 Compiling in Free-Standing Environments
2.18 Compiler Support for Intel MMX and Extended x86 Platform Intrinsics
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
E. Implementation-Defined ISO/IEC C90 Behavior
H. Oracle Solaris Studio C: Differences Between K&R C and ISO C
The C compiler implements a number of extensions to the C language.
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 about supported C99 features, see Table C-6.
The __asm keyword (note the initial double-underscore) is a synonym for the asm keyword. If you use asmrather than __asmand 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:
__asm("string");
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, retaining their order relative to each other and maintaining their position relative to surrounding functions.
At higher optimization levels, the compiler may remove functions that it has determined are not referenced. Because the compiler cannot evaluate which functions are referenced from within global assembly language statements, they might 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.
When specifying architecture-specific instructions it might be necessary to specify an appropriate -xarch value to avoid compilation errors.
__inline and __inline__ are synonyms for the inline keyword (C standard, section 6.4.1)
__builtin_constant_p is a compiler builtin function. It takes a single numeric argument and returns 1 if the argument is a compile-time constant. A return value of 0 means that the compiler can not determine whether the argument is a compile-time constant. A typical use of this built-in 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 Oracle Solaris platforms, __FUNCTION__ and __PRETTY_FUNCTION__ are not available in -Xs and -Xc modes.