Using the GNU Compiler Collection (GCC)
This file documents the use of the GNU compilers. Copyright © 1988-2015 Free Software Foundation, Inc.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with the Invariant Sections being “Funding Free Software”, the Front-Cover Texts being (a) (see below), and with the Back-Cover Texts being (b) (see below). A copy of the license is included in the section entitled “GNU Free Documentation License”.
(a) The FSF's Front-Cover Text is:
A GNU Manual
(b) The FSF's Back-Cover Text is:
You have freedom to copy and modify this GNU Manual, like GNU software. Copies published by the Free Software Foundation raise funds for GNU development.
Table of Contents
-
Introduction
-
1 Programming Languages Supported by GCC
-
2 Language Standards Supported by GCC
-
3 GCC Command Options
-
4 C Implementation-defined behavior
-
5 C++ Implementation-defined behavior
-
6 Extensions to the C Language Family
-
6.1 Statements and Declarations in Expressions
-
6.2 Locally Declared Labels
-
6.3 Labels as Values
-
6.4 Nested Functions
-
6.5 Constructing Function Calls
-
6.6 Referring to a Type with
typeof
-
6.7 Conditionals with Omitted Operands
-
6.8 128-bit integers
-
6.9 Double-Word Integers
-
6.10 Complex Numbers
-
6.11 Additional Floating Types
-
6.12 Half-Precision Floating Point
-
6.13 Decimal Floating Types
-
6.14 Hex Floats
-
6.15 Fixed-Point Types
-
6.16 Named Address Spaces
-
6.17 Arrays of Length Zero
-
6.18 Structures With No Members
-
6.19 Arrays of Variable Length
-
6.20 Macros with a Variable Number of Arguments.
-
6.21 Slightly Looser Rules for Escaped Newlines
-
6.22 Non-Lvalue Arrays May Have Subscripts
-
6.23 Arithmetic on
void
- and Function-Pointers
-
6.24 Non-Constant Initializers
-
6.25 Compound Literals
-
6.26 Designated Initializers
-
6.27 Case Ranges
-
6.28 Cast to a Union Type
-
6.29 Mixed Declarations and Code
-
6.30 Declaring Attributes of Functions
-
6.31 Attribute Syntax
-
6.32 Prototypes and Old-Style Function Definitions
-
6.33 C++ Style Comments
-
6.34 Dollar Signs in Identifier Names
-
6.35 The Character <ESC> in Constants
-
6.36 Specifying Attributes of Variables
-
6.37 Specifying Attributes of Types
-
6.38 Inquiring on Alignment of Types or Variables
-
6.39 An Inline Function is As Fast As a Macro
-
6.40 When is a Volatile Object Accessed?
-
6.41 Assembler Instructions with C Expression Operands
-
6.42 Constraints for
asm
Operands
-
6.43 Controlling Names Used in Assembler Code
-
6.44 Variables in Specified Registers
-
6.45 Alternate Keywords
-
6.46 Incomplete
enum
Types
-
6.47 Function Names as Strings
-
6.48 Getting the Return or Frame Address of a Function
-
6.49 Using Vector Instructions through Built-in Functions
-
6.50 Offsetof
-
6.51 Legacy __sync Built-in Functions for Atomic Memory Access
-
6.52 Built-in functions for memory model aware atomic operations
-
6.53 x86 specific memory model extensions for transactional memory
-
6.54 Object Size Checking Built-in Functions
-
6.55 Cilk Plus C/C++ language extension Built-in Functions.
-
6.56 Other Built-in Functions Provided by GCC
-
6.57 Built-in Functions Specific to Particular Target Machines
-
6.57.1 Alpha Built-in Functions
-
6.57.2 Altera Nios II Built-in Functions
-
6.57.3 ARC Built-in Functions
-
6.57.4 ARC SIMD Built-in Functions
-
6.57.5 ARM iWMMXt Built-in Functions
-
6.57.6 ARM NEON Intrinsics
-
6.57.6.1 Addition
-
6.57.6.2 Multiplication
-
6.57.6.3 Multiply-accumulate
-
6.57.6.4 Multiply-subtract
-
6.57.6.5 Fused-multiply-accumulate
-
6.57.6.6 Fused-multiply-subtract
-
6.57.6.7 Round to integral (to nearest, ties to even)
-
6.57.6.8 Round to integral (to nearest, ties away from zero)
-
6.57.6.9 Round to integral (towards +Inf)
-
6.57.6.10 Round to integral (towards -Inf)
-
6.57.6.11 Round to integral (towards 0)
-
6.57.6.12 Subtraction
-
6.57.6.13 Comparison (equal-to)
-
6.57.6.14 Comparison (greater-than-or-equal-to)
-
6.57.6.15 Comparison (less-than-or-equal-to)
-
6.57.6.16 Comparison (greater-than)
-
6.57.6.17 Comparison (less-than)
-
6.57.6.18 Comparison (absolute greater-than-or-equal-to)
-
6.57.6.19 Comparison (absolute less-than-or-equal-to)
-
6.57.6.20 Comparison (absolute greater-than)
-
6.57.6.21 Comparison (absolute less-than)
-
6.57.6.22 Test bits
-
6.57.6.23 Absolute difference
-
6.57.6.24 Absolute difference and accumulate
-
6.57.6.25 Maximum
-
6.57.6.26 Minimum
-
6.57.6.27 Pairwise add
-
6.57.6.28 Pairwise add, single_opcode widen and accumulate
-
6.57.6.29 Folding maximum
-
6.57.6.30 Folding minimum
-
6.57.6.31 Reciprocal step
-
6.57.6.32 Vector shift left
-
6.57.6.33 Vector shift left by constant
-
6.57.6.34 Vector shift right by constant
-
6.57.6.35 Vector shift right by constant and accumulate
-
6.57.6.36 Vector shift right and insert
-
6.57.6.37 Vector shift left and insert
-
6.57.6.38 Absolute value
-
6.57.6.39 Negation
-
6.57.6.40 Bitwise not
-
6.57.6.41 Count leading sign bits
-
6.57.6.42 Count leading zeros
-
6.57.6.43 Count number of set bits
-
6.57.6.44 Reciprocal estimate
-
6.57.6.45 Reciprocal square-root estimate
-
6.57.6.46 Get lanes from a vector
-
6.57.6.47 Set lanes in a vector
-
6.57.6.48 Create vector from literal bit pattern
-
6.57.6.49 Set all lanes to the same value
-
6.57.6.50 Combining vectors
-
6.57.6.51 Splitting vectors
-
6.57.6.52 Conversions
-
6.57.6.53 Move, single_opcode narrowing
-
6.57.6.54 Move, single_opcode long
-
6.57.6.55 Table lookup
-
6.57.6.56 Extended table lookup
-
6.57.6.57 Multiply, lane
-
6.57.6.58 Long multiply, lane
-
6.57.6.59 Saturating doubling long multiply, lane
-
6.57.6.60 Saturating doubling multiply high, lane
-
6.57.6.61 Multiply-accumulate, lane
-
6.57.6.62 Multiply-subtract, lane
-
6.57.6.63 Vector multiply by scalar
-
6.57.6.64 Vector long multiply by scalar
-
6.57.6.65 Vector saturating doubling long multiply by scalar
-
6.57.6.66 Vector saturating doubling multiply high by scalar
-
6.57.6.67 Vector multiply-accumulate by scalar
-
6.57.6.68 Vector multiply-subtract by scalar
-
6.57.6.69 Vector extract
-
6.57.6.70 Reverse elements
-
6.57.6.71 Bit selection
-
6.57.6.72 Transpose elements
-
6.57.6.73 Zip elements
-
6.57.6.74 Unzip elements
-
6.57.6.75 Element/structure loads, VLD1 variants
-
6.57.6.76 Element/structure stores, VST1 variants
-
6.57.6.77 Element/structure loads, VLD2 variants
-
6.57.6.78 Element/structure stores, VST2 variants
-
6.57.6.79 Element/structure loads, VLD3 variants
-
6.57.6.80 Element/structure stores, VST3 variants
-
6.57.6.81 Element/structure loads, VLD4 variants
-
6.57.6.82 Element/structure stores, VST4 variants
-
6.57.6.83 Logical operations (AND)
-
6.57.6.84 Logical operations (OR)
-
6.57.6.85 Logical operations (exclusive OR)
-
6.57.6.86 Logical operations (AND-NOT)
-
6.57.6.87 Logical operations (OR-NOT)
-
6.57.6.88 Reinterpret casts
-
6.57.7 ARM ACLE Intrinsics
-
6.57.8 AVR Built-in Functions
-
6.57.9 Blackfin Built-in Functions
-
6.57.10 FR-V Built-in Functions
-
6.57.11 X86 Built-in Functions
-
6.57.12 X86 transaction memory intrinsics
-
6.57.13 MIPS DSP Built-in Functions
-
6.57.14 MIPS Paired-Single Support
-
6.57.15 MIPS Loongson Built-in Functions
-
6.57.16 Other MIPS Built-in Functions
-
6.57.17 MSP430 Built-in Functions
-
6.57.18 NDS32 Built-in Functions
-
6.57.19 picoChip Built-in Functions
-
6.57.20 PowerPC Built-in Functions
-
6.57.21 PowerPC AltiVec Built-in Functions
-
6.57.22 PowerPC Hardware Transactional Memory Built-in Functions
-
6.57.23 RX Built-in Functions
-
6.57.24 S/390 System z Built-in Functions
-
6.57.25 SH Built-in Functions
-
6.57.26 SPARC VIS Built-in Functions
-
6.57.27 SPU Built-in Functions
-
6.57.28 TI C6X Built-in Functions
-
6.57.29 TILE-Gx Built-in Functions
-
6.57.30 TILEPro Built-in Functions
-
6.58 Format Checks Specific to Particular Target Machines
-
6.59 Pragmas Accepted by GCC
-
6.60 Unnamed struct/union fields within structs/unions
-
6.61 Thread-Local Storage
-
6.62 Binary constants using the ‘
0b
’ prefix
-
7 Extensions to the C++ Language
-
8 GNU Objective-C features
-
9 Binary Compatibility
-
10
gcov
—a Test Coverage Program
-
11 Known Causes of Trouble with GCC
-
12 Reporting Bugs
-
13 How To Get Help with GCC
-
14 Contributing to GCC Development
-
Funding Free Software
-
The GNU Project and GNU/Linux
-
GNU General Public License
-
GNU Free Documentation License
-
Contributors to GCC
-
Option Index
-
Keyword Index
Introduction
This manual documents how to use the GNU compilers, as well as their features and incompatibilities, and how to report bugs. It corresponds to the compilers (GCC) version 4.9.3. The internals of the GNU compilers, including how to port them to new targets and some information about how to write front ends for new languages, are documented in a separate manual. See Introduction.