Using the GNU Compiler Collection
For gcc version 8.2.0
(GNU MCU Eclipse RISC-V Embedded GCC\x2C 64-bit)
Richard M. Stallman and the GCC Developer Community
Published by:
GNU Press Website: http://www.gnupress.org
a division of the General: press@gnu.org
Free Software Foundation Orders: sales@gnu.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-2018 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 . . . . . . . . . . . . . . . . . . . . 429
5 C++ Implementation-Defined Behavior . . . . . . . . . . . . . . . . . 437
6 Extensions to the C Language Family . . . . . . . . . . . . . . . . . . . 439
7 Extensions to the C++ Language . . . . . . . . . . . . . . . . . . . . . . 787
8 GNU Objective-C Features . . . . . . . . . . . . . . . . . . . . . . . . . . . 801
9 Binary Compatibility . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 817
10 gcov—a Test Coverage Program . . . . . . . . . . . . . . . . . . . . . . . 821
11 gcov-tool—an Offline Gcda Profile Processing Tool . . . . . . . 833
12 gcov-dump—an Offline Gcda and Gcno Profile Dump Tool . . 837
13 Known Causes of Trouble with GCC . . . . . . . . . . . . . . . . . . . . 839
14 Reporting Bugs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 855
15 How To Get Help with GCC . . . . . . . . . . . . . . . . . . . . . . . . . . 857
16 Contributing to GCC Development . . . . . . . . . . . . . . . . . . . . . 859
Funding Free Software . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 861
The GNU Project and GNU/Linux. . . . . . . . . . . . . . . . . . . . . . . . . 863
GNU General Public License . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 865
GNU Free Documentation License . . . . . . . . . . . . . . . . . . . . . . . . . 877
Contributors to GCC . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 885
Option Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 903
Keyword Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 927
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 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
3.4 Options Controlling C Dialect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
3.5 Options Controlling C++ Dialect . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42
3.6 Options Controlling Objective-C and Objective-C++ Dialects . . 55
3.7 Options to Control Diagnostic Messages Formatting . . . . . . . . . . . 59
3.8 Options to Request or Suppress Warnings . . . . . . . . . . . . . . . . . . . . . 62
3.9 Options for Debugging Your Program . . . . . . . . . . . . . . . . . . . . . . . . 108
3.10 Options That Control Optimization . . . . . . . . . . . . . . . . . . . . . . . . . 114
3.11 Program Instrumentation Options. . . . . . . . . . . . . . . . . . . . . . . . . . . 172
3.12 Options Controlling the Preprocessor. . . . . . . . . . . . . . . . . . . . . . . . 187
3.13 Passing Options to the Assembler . . . . . . . . . . . . . . . . . . . . . . . . . . . 194
3.14 Options for Linking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195
3.15 Options for Directory Search . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 199
3.16 Options for Code Generation Conventions . . . . . . . . . . . . . . . . . . . 202
3.17 GCC Developer Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 212
3.18 Machine-Dependent Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
3.18.1 AArch64 Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228
3.18.1.1 ‘-march’ and ‘-mcpu’ Feature Modifiers . . . . . . . . . . . . 232
3.18.2 Adapteva Epiphany Options . . . . . . . . . . . . . . . . . . . . . . . . . . . 233
3.18.3 ARC Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 235
3.18.4 ARM Options. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245
3.18.5 AVR Options . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 258
3.18.5.1 EIND and Devices with More Than 128 Ki Bytes of
Flash. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 262
3.18.5.2 Handling of the RAMPD, RAMPX, RAMPY and RAMPZ Special
Function Registers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 264
评论0