
iii
Table of Contents
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1 Programming Languages Supported by GCC
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2 Language Standards Supported by GCC . . . . . 5
2.1 C Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2 C++ Language . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.3 Objective-C and Objective-C++ Languages . . . . . . . . . . . . . . . . . . . . 7
2.4 Go Language. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.5 HSA Intermediate Language (HSAIL) . . . . . . . . . . . . . . . . . . . . . . . . . . 8
2.6 References for Other Languages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3 GCC Command Options . . . . . . . . . . . . . . . . . . . . . . . 9
3.1 Option Summary. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.2 Options Controlling the Kind of Output . . . . . . . . . . . . . . . . . . . . . . . 29
3.3 Compiling C++ Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
3.4 Options Controlling C Dialect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
3.5 Options Controlling C++ Dialect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
3.6 Options Controlling Objective-C and Objective-C++ Dialects . . 56
3.7 Options to Control Diagnostic Messages Formatting . . . . . . . . . . . 59
3.8 Options to Request or Suppress Warnings . . . . . . . . . . . . . . . . . . . . . 63
3.9 Options for Debugging Your Program . . . . . . . . . . . . . . . . . . . . . . . . 109
3.10 Options That Control Optimization . . . . . . . . . . . . . . . . . . . . . . . . . 116
3.11 Program Instrumentation Options. . . . . . . . . . . . . . . . . . . . . . . . . . . 176
3.12 Options Controlling the Preprocessor. . . . . . . . . . . . . . . . . . . . . . . . 188
3.13 Passing Options to the Assembler . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
3.14 Options for Linking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
3.15 Options for Directory Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
3.16 Options for Code Generation Conventions . . . . . . . . . . . . . . . . . . . 204
3.17 GCC Developer Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214
3.18 Machine-Dependent Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
3.18.1 AArch64 Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230
3.18.1.1 ‘-march’ and ‘-mcpu’ Feature Modifiers . . . . . . . . . . . . 234
3.18.2 Adapteva Epiphany Options . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
3.18.3 ARC Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 237
3.18.4 ARM Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247
3.18.5 AVR Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 260
3.18.5.1 EIND and Devices with More Than 128 Ki Bytes of
Flash. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 265
3.18.5.2 Handling of the RAMPD, RAMPX, RAMPY and RAMPZ Special
Function Registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 266