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
5.1 Introduction to Type-Based Analysis
5.2 Using Pragmas for Finer Control
5.2.1 #pragma alias_level level (list)
5.2.1.1 #pragma alias (type, type [, type]...)
5.2.1.2 #pragma alias (pointer, pointer [, pointer]...)
5.2.1.3 #pragma may_point_to (pointer, variable [, variable]...)
5.2.1.4 #pragma noalias (type, type [, type]...)
5.2.1.5 #pragma noalias (pointer, pointer [, pointer]...)
5.2.1.6 #pragma may_not_point_to (pointer, variable [, variable]...)
5.3.1 Struct Pointer Cast of Scalar Pointer
5.3.2 Struct Pointer Cast of Void Pointer
5.3.3 Cast of Struct Field to Structure Pointer
5.3.4 Explicit Aliasing Required
5.4 Examples of Memory Reference Constraints
5.4.1 Example: Levels of Aliasing
5.4.2 Example: Compiling with Different Aliasing Levels
5.4.3 Example: Interior Pointers
5.4.6 Example: Structs of Structs
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
This chapter explains how to use the -xalias_level option and several pragmas to enable the compiler to perform type-based alias analysis and optimizations. You use these extensions to express type-based information about the way pointers are used in your C program. The C compiler uses this information, in turn, for alias disambiguation of pointer-based memory references in your program.
See B.2.76 -xalias_level[=l] for a detailed explanation of this command’s syntax. Also, see 4.3.38 -Xalias_level[=l] for an explanation of the lint program’s type-based alias-analysis capabilities.