Using the GNU Compiler Collection (GCC)#
Contents:
- Copyright
- Introduction
- Programming Languages Supported by GCC
- Language Standards Supported by GCC
- GCC Command Options
- Description
- Option Summary
- Options Controlling the Kind of Output
- Compiling C++ Programs
- Options Controlling C Dialect
- Options Controlling C++ Dialect
- Options Controlling Objective-C and Objective-C++ Dialects
- Options to Control Diagnostic Messages Formatting
- Options to Request or Suppress Warnings
- Options That Control Static Analysis
- Options for Debugging Your Program
- Options That Control Optimization
- Program Instrumentation Options
- Options Controlling the Preprocessor
- Passing Options to the Assembler
- Options for Linking
- Options for Directory Search
- Options for Code Generation Conventions
- GCC Developer Options
- Machine-Dependent Options
- AArch64 Options
- Adapteva Epiphany Options
- AMD GCN Options
- ARC Options
- ARM Options
- AVR Options
- Blackfin Options
- C6X Options
- CRIS Options
- C-SKY Options
- Darwin Options
- DEC Alpha Options
- eBPF Options
- FR30 Options
- FT32 Options
- FRV Options
- GNU/Linux Options
- H8/300 Options
- HPPA Options
- IA-64 Options
- LM32 Options
- LoongArch Options
- M32C Options
- M32R/D Options
- M680x0 Options
- MCore Options
- MeP Options
- MicroBlaze Options
- MIPS Options
- MMIX Options
- MN10300 Options
- Moxie Options
- MSP430 Options
- NDS32 Options
- Nios II Options
- Nvidia PTX Options
- OpenRISC Options
- PDP-11 Options
- picoChip Options
- PowerPC Options
- PRU Options
- RISC-V Options
- RL78 Options
- IBM RS/6000 and PowerPC Options
- RX Options
- S/390 and zSeries Options
- Score Options
- SH Options
- Solaris 2 Options
- SPARC Options
- Options for System V
- V850 Options
- VAX Options
- Visium Options
- VMS Options
- VxWorks Options
- x86 Options
- x86 Windows Options
- Xstormy16 Options
- Xtensa Options
- zSeries Options
- Specifying Subprocesses and the Switches to Pass to Them
- Environment Variables Affecting GCC
- Using Precompiled Headers
- C++ Modules
- C Implementation-Defined Behavior
- C++ Implementation-Defined Behavior
- Extensions to the C Language Family
- Statements and Declarations in Expressions
- Locally Declared Labels
- Labels as Values
- Nested Functions
- Nonlocal Gotos
- Constructing Function Calls
- Referring to a Type with typeof
- Conditionals with Omitted Operands
- 128-bit Integers
- Double-Word Integers
- Complex Numbers
- Additional Floating Types
- Half-Precision Floating Point
- Decimal Floating Types
- Hex Floats
- Fixed-Point Types
- Named Address Spaces
- Arrays of Length Zero
- Structures with No Members
- Arrays of Variable Length
- Macros with a Variable Number of Arguments.
- Slightly Looser Rules for Escaped Newlines
- Non-Lvalue Arrays May Have Subscripts
- Arithmetic on void- and Function-Pointers
- Pointer Arguments in Variadic Functions
- Pointers to Arrays with Qualifiers Work as Expected
- Non-Constant Initializers
- Compound Literals
- Designated Initializers
- Case Ranges
- Cast to a Union Type
- Mixed Declarations, Labels and Code
- Declaring Attributes of Functions
- Common Function Attributes
- AArch64 Function Attributes
- AMD GCN Function Attributes
- ARC Function Attributes
- ARM Function Attributes
- AVR Function Attributes
- Blackfin Function Attributes
- BPF Function Attributes
- C-SKY Function Attributes
- Epiphany Function Attributes
- H8/300 Function Attributes
- IA-64 Function Attributes
- M32C Function Attributes
- M32R/D Function Attributes
- m68k Function Attributes
- MCORE Function Attributes
- MeP Function Attributes
- MicroBlaze Function Attributes
- Microsoft Windows Function Attributes
- MIPS Function Attributes
- MSP430 Function Attributes
- NDS32 Function Attributes
- Nios II Function Attributes
- Nvidia PTX Function Attributes
- PowerPC Function Attributes
- RISC-V Function Attributes
- RL78 Function Attributes
- RX Function Attributes
- S/390 Function Attributes
- SH Function Attributes
- Symbian OS Function Attributes
- V850 Function Attributes
- Visium Function Attributes
- x86 Function Attributes
- Xstormy16 Function Attributes
- Specifying Attributes of Variables
- Common Variable Attributes
- ARC Variable Attributes
- AVR Variable Attributes
- Blackfin Variable Attributes
- H8/300 Variable Attributes
- IA-64 Variable Attributes
- LoongArch Variable Attributes
- M32R/D Variable Attributes
- MeP Variable Attributes
- Microsoft Windows Variable Attributes
- MSP430 Variable Attributes
- Nvidia PTX Variable Attributes
- PowerPC Variable Attributes
- RL78 Variable Attributes
- V850 Variable Attributes
- x86 Variable Attributes
- Xstormy16 Variable Attributes
- Specifying Attributes of Types
- Label Attributes
- Enumerator Attributes
- Statement Attributes
- Attribute Syntax
- Prototypes and Old-Style Function Definitions
- C++ Style Comments
- Dollar Signs in Identifier Names
- The Character ESC in Constants
- Determining the Alignment of Functions, Types or Variables
- An Inline Function is As Fast As a Macro
- When is a Volatile Object Accessed?
- How to Use Inline Assembly Language in C Code
- Basic Asm — Assembler Instructions Without Operands
- Qualifiers
- Parameters
- Remarks
- Extended Asm - Assembler Instructions with C Expression Operands
- Qualifiers
- Parameters
- Remarks
- Special format strings
- Multiple assembler dialects in asm templates
- Constraints for asm Operands
- Simple Constraints
- Multiple Alternative Constraints
- Register Class Preferences
- Constraint Modifier Characters
- Constraints for Particular Machines
- AArch64 family—
config/aarch64/constraints.md
- AMD GCN —
config/gcn/constraints.md
- ARC —
config/arc/constraints.md
- ARM family—
config/arm/constraints.md
- AVR family—
config/avr/constraints.md
- Blackfin family—
config/bfin/constraints.md
- Epiphany—
config/epiphany/constraints.md
- FRV—
config/frv/frv.h
- FT32—
config/ft32/constraints.md
- Hewlett-Packard PA-RISC—
config/pa/pa.h
- Intel IA-64—
config/ia64/ia64.h
- M32C—
config/m32c/m32c.cc
- LoongArch—
config/loongarch/constraints.md
- MicroBlaze—
config/microblaze/constraints.md
- MIPS—
config/mips/constraints.md
- Motorola 680x0—
config/m68k/constraints.md
- Moxie—
config/moxie/constraints.md
- MSP430—
config/msp430/constraints.md
- NDS32—
config/nds32/constraints.md
- Nios II family—
config/nios2/constraints.md
- OpenRISC—
config/or1k/constraints.md
- PDP-11—
config/pdp11/constraints.md
- PowerPC and IBM RS6000—
config/rs6000/constraints.md
- PRU—
config/pru/constraints.md
- RL78—
config/rl78/constraints.md
- RISC-V—
config/riscv/constraints.md
- RX—
config/rx/constraints.md
- S/390 and zSeries—
config/s390/s390.h
- SPARC—
config/sparc/sparc.h
- TI C6X family—
config/c6x/constraints.md
- Visium—
config/visium/constraints.md
- x86 family—
config/i386/constraints.md
- Xstormy16—
config/stormy16/stormy16.h
- Xtensa—
config/xtensa/constraints.md
- AArch64 family—
- Controlling Names Used in Assembler Code
- Assembler names for data
- Assembler names for functions
- Variables in Specified Registers
- Declaring the variable
- Using the variable
- Size of an asm
- Alternate Keywords
- Incomplete enum Types
- Function Names as Strings
- Getting the Return or Frame Address of a Function
- Using Vector Instructions through Built-in Functions
- Support for offsetof
- Legacy __sync Built-in Functions for Atomic Memory Access
- Built-in Functions for Memory Model Aware Atomic Operations
- Built-in Functions to Perform Arithmetic with Overflow Checking
- x86-Specific Memory Model Extensions for Transactional Memory
- Object Size Checking Built-in Functions
- Other Built-in Functions Provided by GCC
- Built-in Functions Specific to Particular Target Machines
- AArch64 Built-in Functions
- Alpha Built-in Functions
- Altera Nios II Built-in Functions
- ARC Built-in Functions
- ARC SIMD Built-in Functions
- ARM iWMMXt Built-in Functions
- ARM C Language Extensions (ACLE)
- ARM Floating Point Status and Control Intrinsics
- ARM ARMv8-M Security Extensions
- AVR Built-in Functions
- Blackfin Built-in Functions
- BPF Built-in Functions
- FR-V Built-in Functions
- MIPS DSP Built-in Functions
- MIPS Paired-Single Support
- MIPS Loongson Built-in Functions
- MIPS SIMD Architecture (MSA) Support
- Other MIPS Built-in Functions
- MSP430 Built-in Functions
- NDS32 Built-in Functions
- picoChip Built-in Functions
- Basic PowerPC Built-in Functions
- Basic PowerPC Built-in Functions Available on all Configurations
- Basic PowerPC Built-in Functions Available on ISA 2.05
- Basic PowerPC Built-in Functions Available on ISA 2.06
- Basic PowerPC Built-in Functions Available on ISA 2.07
- Basic PowerPC Built-in Functions Available on ISA 3.0
- Basic PowerPC Built-in Functions Available on ISA 3.1
- PowerPC AltiVec/VSX Built-in Functions
- PowerPC Hardware Transactional Memory Built-in Functions
- PowerPC Atomic Memory Operation Functions
- PowerPC Matrix-Multiply Assist Built-in Functions
- PRU Built-in Functions
- RISC-V Built-in Functions
- RX Built-in Functions
- S/390 System z Built-in Functions
- SH Built-in Functions
- SPARC VIS Built-in Functions
- TI C6X Built-in Functions
- x86 Built-in Functions
- x86 Transactional Memory Intrinsics
- x86 Control-Flow Protection Intrinsics
- Format Checks Specific to Particular Target Machines
- Pragmas Accepted by GCC
- AArch64 Pragmas
- ARM Pragmas
- M32C Pragmas
- MeP Pragmas
- PRU Pragmas
- RS/6000 and PowerPC Pragmas
- S/390 Pragmas
- Darwin Pragmas
- Solaris Pragmas
- Symbol-Renaming Pragmas
- Structure-Layout Pragmas
- Weak Pragmas
- Diagnostic Pragmas
- Visibility Pragmas
- Push/Pop Macro Pragmas
- Function Specific Option Pragmas
- Loop-Specific Pragmas
- Unnamed Structure and Union Fields
- Thread-Local Storage
- Binary Constants using the 0b Prefix
- Extensions to the C++ Language
- Vague Linkage
- Function Multiversioning
- Type Traits
- C++ Concepts
- Deprecated Features
- Backwards Compatibility
- When is a Volatile C++ Object Accessed?
- Restricting Pointer Aliasing
- C++ Interface and Implementation Pragmas
- Where’s the Template?
- Extracting the Function Pointer from a Bound Pointer to Member Function
- C++-Specific Variable, Function, and Type Attributes
- GNU Objective-C Features
- Binary Compatibility
- gcov—a Test Coverage Program
- gcov-tool—an Offline Gcda Profile Processing Tool
- gcov-dump—an Offline Gcda and Gcno Profile Dump Tool
- lto-dump—Tool for dumping LTO object files.
- Known Causes of Trouble with GCC
- Reporting Bugs
- How To Get Help with GCC
- Contributing to GCC Development
- Funding Free Software
- The GNU Project and GNU/Linux
- GNU GENERAL PUBLIC LICENSE
- Preamble
- TERMS AND CONDITIONS
- 0. Definitions.
- 1. Source Code.
- 2. Basic Permissions.
- 3. Protecting Users’ Legal Rights From Anti-Circumvention Law.
- 4. Conveying Verbatim Copies.
- 5. Conveying Modified Source Versions.
- 6. Conveying Non-Source Forms.
- 7. Additional Terms.
- 8. Termination.
- 9. Acceptance Not Required for Having Copies.
- 10. Automatic Licensing of Downstream Recipients.
- 11. Patents.
- 12. No Surrender of Others’ Freedom.
- 13. Use with the GNU Affero General Public License.
- 14. Revised Versions of this License.
- 15. Disclaimer of Warranty.
- 16. Limitation of Liability.
- 17. Interpretation of Sections 15 and 16.
- How to Apply These Terms to Your New Programs
- GNU Free Documentation License
- Preamble
- 1. APPLICABILITY AND DEFINITIONS
- 2. VERBATIM COPYING
- 3. COPYING IN QUANTITY
- 4. MODIFICATIONS
- 5. COMBINING DOCUMENTS
- 6. COLLECTIONS OF DOCUMENTS
- 7. AGGREGATION WITH INDEPENDENT WORKS
- 8. TRANSLATION
- 9. TERMINATION
- 10. FUTURE REVISIONS OF THIS LICENSE
- 11. RELICENSING
- ADDENDUM: How to use this License for your documents
- Contributors to GCC
- Indexes and tables