gcc.pdf

(2280 KB) Pobierz
1130258 UNPDF
UsingtheGNUCompilerCollection
Forgccversion4.2.2
RichardM.Stallmanandthe GCC DeveloperCommunity
 
Publishedby:
GNUPress Website:www.gnupress.org
adivisionofthe General:press@gnu.org
FreeSoftwareFoundation Orders:sales@gnu.org
51FranklinStreet,FifthFloor Tel617-542-5942
Boston,MA02110-1301USA Fax617-542-2652
LastprintedOctober2003forGCC3.3.1.
Printedcopiesareavailablefor$45each.
Copyrightc1988,1989,1992,1993,1994,1995,1996,1997,1998,1999,2000,2001,2002,
2003,2004,2005FreeSoftwareFoundation,Inc.
Permissionisgrantedtocopy,distributeand/ormodifythisdocumentunderthetermsof
theGNUFreeDocumentationLicense,Version1.2oranylaterversionpublishedbythe
FreeSoftwareFoundation;withtheInvariantSectionsbeing“GNUGeneralPublicLicense”
and“FundingFreeSoftware”,theFront-Covertextsbeing(a)(seebelow),andwiththe
Back-CoverTextsbeing(b)(seebelow).Acopyofthelicenseisincludedinthesection
entitled“GNUFreeDocumentationLicense”.
(a)TheFSF’sFront-CoverTextis:
AGNUManual
(b)TheFSF’sBack-CoverTextis:
YouhavefreedomtocopyandmodifythisGNUManual,likeGNUsoftware.Copies
publishedbytheFreeSoftwareFoundationraisefundsforGNUdevelopment.
i
ShortContents
Introduction ...................................... 1
1ProgrammingLanguagesSupportedbyGCC ............ 3
2LanguageStandardsSupportedbyGCC ............... 5
3GCCCommandOptions .......................... 7
4CImplementation-definedbehavior ................. 213
5ExtensionstotheCLanguageFamily ................ 221
6ExtensionstotheC++Language .................. 375
7GNUObjective-Cruntimefeatures .................. 385
8BinaryCompatibility ........................... 391
9 gcov —aTestCoverageProgram ................... 395
10KnownCausesofTroublewithGCC ................ 403
11ReportingBugs ............................... 421
12HowToGetHelpwithGCC ...................... 423
13ContributingtoGCCDevelopment ................. 425
FundingFreeSoftware ............................. 427
TheGNUProjectandGNU/Linux ..................... 429
GNUGENERALPUBLICLICENSE ................... 431
GNUFreeDocumentationLicense ..................... 437
ContributorstoGCC .............................. 445
OptionIndex .................................... 461
KeywordIndex .................................. 475
ii UsingtheGNUCompilerCollection(GCC)
iii
TableofContents
Introduction.................................. 1
1ProgrammingLanguagesSupportedbyGCC
......................................... 3
2LanguageStandardsSupportedbyGCC.... 5
3GCCCommandOptions................... 7
3.1OptionSummary............................................ 7
3.2OptionsControllingtheKindofOutput..................... 18
3.3CompilingC++Programs.................................. 21
3.4OptionsControllingCDialect............................... 22
3.5OptionsControllingC++Dialect............................ 26
3.6OptionsControllingObjective-CandObjective-C++Dialects.. 33
3.7OptionstoControlDiagnosticMessagesFormatting........... 37
3.8OptionstoRequestorSuppressWarnings.................... 38
3.9OptionsforDebuggingYourProgramorGCC................ 56
3.10OptionsThatControlOptimization........................ 68
3.11OptionsControllingthePreprocessor....................... 99
3.12PassingOptionstotheAssembler......................... 108
3.13OptionsforLinking...................................... 109
3.14OptionsforDirectorySearch.............................. 112
3.15Specifyingsubprocessesandtheswitchestopasstothem.... 114
3.16SpecifyingTargetMachineandCompilerVersion........... 120
3.17HardwareModelsandConfigurations...................... 121
3.17.1ARCOptions....................................... 121
3.17.2ARMOptions....................................... 121
3.17.3AVROptions........................................ 125
3.17.4BlackfinOptions..................................... 126
3.17.5CRISOptions....................................... 127
3.17.6CRXOptions....................................... 129
3.17.7DarwinOptions..................................... 129
3.17.8DECAlphaOptions................................. 133
3.17.9DECAlpha/VMSOptions........................... 137
3.17.10FRVOptions....................................... 137
3.17.11GNU/LinuxOptions................................ 141
3.17.12H8/300Options.................................... 141
3.17.13HPPAOptions..................................... 142
3.17.14Intel386andAMDx86-64Options.................. 145
3.17.15IA-64Options...................................... 153
3.17.16M32COptions..................................... 156
3.17.17M32R/DOptions................................... 157
Zgłoś jeśli naruszono regulamin