This chapter’s goal is to get you comfortable with typical GCC usage. It goes behind the scenes and dissects the half-dozen or so GCC command-line options you use by habit. When you invoke GCC to compile a source code file, the compilation process passes through as many as four stages: preprocessing, compilation, assembly, and linking. You will learn in this chapter how to stop the compilation process at any one of these stages. GCC also accepts many additional options that control the behavior of the preprocessor, the linker, and the assembler, so this chapter shows you the ins and outs of these magic GCC incantations, too. Other options discussed in this chapter allow you to modify the directory search path GCC uses when it runs and also enable you to exercise greater control over the content format of GCC’s diagnostic messages. You will also learn how to tell GCC which dialect of C, such as strict ANSI/ISO C or good ole Kernighan and Ritchie (K&R) C, it should expect. Finally, you will learn a variety of command-line options you can use when compiling C++ code.
KeywordsPrefix Suffix Folk Vanilla Alloca
Unable to display preview. Download preview PDF.