
Using the GNU Compiler Collection
For gcc version 7.3.1
(GNU Tools for Arm Embedded Processors 7-2018-q2-update)
Richard M. Stallman and the GCC Developer Community

Published by:
GNU Press Website: http://www.gnupress.org
51 Franklin Street, Fifth Floor Tel 617-542-5942
Boston, MA 02110-1301 USA Fax 617-542-2652
Last printed October 2003 for GCC 3.3.1.
Printed copies are available for $45 each.
Copyright
c
1988-2017 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.

i
Short Contents
Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1 Programming Languages Supported by GCC . . . . . . . . . . . . . . . 3
2 Language Standards Supported by GCC . . . . . . . . . . . . . . . . . . 5
3 GCC Command Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4 C Implementation-Defined Behavior . . . . . . . . . . . . . . . . . . . . 395
5 C++ Implementation-Defined Behavior . . . . . . . . . . . . . . . . . 403
6 Extensions to the C Language Family . . . . . . . . . . . . . . . . . . . 405
7 Extensions to the C++ Language . . . . . . . . . . . . . . . . . . . . . . 735
8 GNU Objective-C Features . . . . . . . . . . . . . . . . . . . . . . . . . . . 749
9 Binary Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 765
10 gcov—a Test Coverage Program . . . . . . . . . . . . . . . . . . . . . . . 769
11 gcov-tool—an Offline Gcda Profile Processing Tool . . . . . . . 779
12 gcov-dump—an Offline Gcda and Gcno Profile Dump Tool . . 783
13 Known Causes of Trouble with GCC . . . . . . . . . . . . . . . . . . . . 785
14 Reporting Bugs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 801
15 How To Get Help with GCC . . . . . . . . . . . . . . . . . . . . . . . . . . 803
16 Contributing to GCC Development . . . . . . . . . . . . . . . . . . . . . 805
Funding Free Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 807
The GNU Project and GNU/Linux. . . . . . . . . . . . . . . . . . . . . . . . . 809
GNU General Public License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 811
GNU Free Documentation License . . . . . . . . . . . . . . . . . . . . . . . . . 823
Contributors to GCC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 831
Option Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 849
Keyword Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 873


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 . . . . . . . . . . . . . . . . . . . . . . . 27
3.3 Compiling C++ Programs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
3.4 Options Controlling C Dialect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
3.5 Options Controlling C++ Dialect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
3.6 Options Controlling Objective-C and Objective-C++ Dialects . . 53
3.7 Options to Control Diagnostic Messages Formatting . . . . . . . . . . . 56
3.8 Options to Request or Suppress Warnings . . . . . . . . . . . . . . . . . . . . . 59
3.9 Options for Debugging Your Program . . . . . . . . . . . . . . . . . . . . . . . . 101
3.10 Options That Control Optimization . . . . . . . . . . . . . . . . . . . . . . . . . 106
3.11 Program Instrumentation Options. . . . . . . . . . . . . . . . . . . . . . . . . . . 164
3.12 Options Controlling the Preprocessor. . . . . . . . . . . . . . . . . . . . . . . . 176
3.13 Passing Options to the Assembler . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
3.14 Options for Linking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183
3.15 Options for Directory Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 188
3.16 Options for Code Generation Conventions . . . . . . . . . . . . . . . . . . . 191
3.17 GCC Developer Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 201
3.18 Machine-Dependent Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
3.18.1 AArch64 Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 217
3.18.1.1 ‘-march’ and ‘-mcpu’ Feature Modifiers . . . . . . . . . . . . 220
3.18.2 Adapteva Epiphany Options . . . . . . . . . . . . . . . . . . . . . . . . . . . 221
3.18.3 ARC Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223
3.18.4 ARM Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 232
3.18.5 AVR Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 238
3.18.5.1 EIND and Devices with More Than 128 Ki Bytes of
Flash. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243
3.18.5.2 Handling of the RAMPD, RAMPX, RAMPY and RAMPZ Special
Function Registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 244