Red Hat Enterprise Linux 4 Red Hat Enterprise Linux 4
Total Page:16
File Type:pdf, Size:1020Kb
Red Hat Enterprise Linux 4 Red Hat Enterprise Linux 4 Copyright © 1987, 1989, 1991-2004 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.2 or any later version published by the Free Software Foundation; with the Invariant Sections being "GNU General Public License" and "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. For a copy of the GNU General Public License, see http://www.gnu.org/copyleft/gpl.html. This version is by Red Hat, Inc. Red Hat, Inc. 1801 Varsity Drive Raleigh NC 27606-2072 USA Phone: +1 919 754 3700 Phone: 888 733 4281 Fax: +1 919 754 3701 PO Box 13588 Research Triangle Park NC 27709 USA gcc(EN)-4-Print-RHI (2005-02-01) Red Hat and the Red Hat "Shadow Man" logo are registered trademarks of Red Hat, Inc. in the United States and other countries. All other trademarks referenced herein are the property of their respective owners. The GPG fingerprint of the [email protected] key is: CA 20 86 86 2B D6 9D FC 65 F6 EC C4 21 91 80 CD DB 42 A6 0E Table of Contents 1. Introduction..................................................................................................................................... 1 2. Programming Languages Supported by GCC ............................................................................. 3 3. Language Standards Supported by GCC..................................................................................... 5 4. GCC Command Options ................................................................................................................ 7 4.1. Option Summary................................................................................................................ 7 4.2. Options Controlling the Kind of Output .......................................................................... 16 4.3. Compiling C++ Programs................................................................................................ 19 4.4. Options Controlling C Dialect ......................................................................................... 19 4.5. Options Controlling C++ Dialect..................................................................................... 23 4.6. Options Controlling Objective-C Dialect ........................................................................ 29 4.7. Options to Control Diagnostic Messages Formatting...................................................... 32 4.8. Options to Request or Suppress Warnings....................................................................... 32 4.9. Options for Debugging Your Program or GCC ............................................................... 45 4.10. Options That Control Optimization ............................................................................... 53 4.11. Options Controlling the Preprocessor............................................................................ 72 4.12. Passing Options to the Assembler.................................................................................. 81 4.13. Options for Linking........................................................................................................ 81 4.14. Options for Directory Search......................................................................................... 83 4.15. Specifying subprocesses and the switches to pass to them............................................ 85 4.16. Specifying Target Machine and Compiler Version ........................................................ 92 4.17. Hardware Models and Configurations ........................................................................... 92 4.17.1. IBM RS/6000 and PowerPC Options ............................................................. 93 4.17.2. Darwin Options............................................................................................. 101 4.17.3. Intel 386 and AMD x86-64 Options ............................................................. 102 4.17.4. IA-64 Options ............................................................................................... 109 4.17.5. S/390 and zSeries Options ............................................................................ 110 4.18. Options for Code Generation Conventions.................................................................. 112 4.19. Environment Variables Affecting GCC ....................................................................... 118 4.20. Using Precompiled Headers......................................................................................... 120 4.21. Running Protoize ......................................................................................................... 121 5. C Implementation-defined behavior ......................................................................................... 125 5.1. Translation ..................................................................................................................... 125 5.2. Environment................................................................................................................... 125 5.3. Identifiers ....................................................................................................................... 125 5.4. Characters ...................................................................................................................... 125 5.5. Integers........................................................................................................................... 126 5.6. Floating point................................................................................................................. 126 5.7. Arrays and pointers........................................................................................................ 127 5.8. Hints............................................................................................................................... 127 5.9. Structures, unions, enumerations, and bit-fields ............................................................ 127 5.10. Qualifiers...................................................................................................................... 128 5.11. Preprocessing directives............................................................................................... 128 5.12. Library functions.......................................................................................................... 128 5.13. Architecture.................................................................................................................. 128 5.14. Locale-specific behavior .............................................................................................. 129 6. Extensions to the C Language Family....................................................................................... 131 6.1. Statements and Declarations in Expressions.................................................................. 131 6.2. Locally Declared Labels ................................................................................................ 132 6.3. Labels as Values............................................................................................................. 133 6.4. Nested Functions............................................................................................................ 134 6.5. Constructing Function Calls .......................................................................................... 136 6.6. Referring to a Type with typeof .................................................................................. 137 6.7. Generalized Lvalues....................................................................................................... 138 6.8. Conditionals with Omitted Operands............................................................................. 139 6.9. Double-Word Integers.................................................................................................... 140 6.10. Complex Numbers ....................................................................................................... 140 6.11. Hex Floats .................................................................................................................... 141 6.12. Arrays of Length Zero ................................................................................................. 141 6.13. Structures With No Members ...................................................................................... 142 6.14. Arrays of Variable Length............................................................................................ 142 6.15. Macros with a Variable Number of Arguments. .......................................................... 144 6.16. Slightly Looser Rules for Escaped Newlines............................................................... 144 6.17. Non-Lvalue Arrays May Have Subscripts ................................................................... 145 6.18. Arithmetic on void- and Function-Pointers................................................................ 145 6.19. Non-Constant