To use gcc, the standard C compiler used with Linux, you need to know the command-line options. Also, gcc extends the C language in several ways. Even if you intend to write only ANSI-C-compliant source code, you will need to know some of the extensions to understand the Linux header files. Most of gcc's command-line options are normal, as C compilers go. For a few options, there do not appear to be any standards. We cover the most important options, options that are used on a day-to-day basis. Standard ISO-standard C is a useful goal, but as low-level as C is, there are situations in which it is not expressive enough. There are two areas in Linux in which gcc's extensions get particular use: interfacing with assembly-language code (covered in Brennan's Guide to Inline Assembly[1]) and building shared libraries (covered in Chapter 8). Because header files are parts of those shared libraries, some of the extensions show through in the system header files, as well. [1] http://www.delorie.com/djgpp/doc/brennan/ Of course, there are also lots of extensions that are useful in all sorts of other everyday coding, as long as you do not mind being gratuitously nonstandard. For more documentation about these extensions, see the gcc Texinfo documentation. |