An Introduction to GCC
for the GNU Compilers
(1) For details see the license file ‘COPYING’ distributed with GCC.
(3) If the prototype of a function has changed, it is necessary to modify and recompile all of the other source files which use it.
(4) This assumes that there is no file called ‘clean’ in the current directory--see the discussion of "phony targets" in the GNU Make manual for details.
(5) On systems supporting both 64 and 32-bit executables the 64-bit versions of the libraries will often be stored in ‘/usr/lib64’ and ‘/lib64’, with the 32-bit versions in ‘/usr/lib’ and ‘/lib’.
(6) The actual output shown above may differ, depending on the specific platform and environment.
(7) The default search paths may also include additional system-dependent or site-specific directories, and directories in the GCC installation itself. For example, on 64-bit platforms additional ‘lib64’ directories may also be searched by default.
In GNU Bash, the shorter form
is also allowed.
current directory can also be specified using an empty path element. For
:DIR1:DIR2 is equivalent to
Note that the directory containing the shared
library can, in principle, be stored ("hard-coded") in the executable
itself using the linker option
-rpath, but this is not usually
done since it creates problems if the library is moved or the executable
is copied to another system.
-D option for
defining macros will be explained in detail in the next chapter.
(12) The traditional form of the C language was described in the original C reference manual "The C Programming Language (First Edition)" by Kernighan and Ritchie.
In recent versions
of GCC the preprocessor is integrated into the compiler, although a
cpp command is also provided.
(14) The terminology dates back to the time of magnetic core memory.
(15) Historically, a null pointer corresponded to memory location 0, which is typically restricted to the operating system kernel. In practice this is not always how a null pointer works, but the result is usually the same.
Some systems, such as FreeBSD and Solaris, can also
be configured to write core files in specific directories,
e.g. ‘/var/coredumps/’, using the
This example uses the
ulimit command in the GNU
Bash shell. On other systems the usage of the
ulimit command may
vary, or have a different name (the
tcsh shell uses the
limit command instead). The size limit for core files can also
be set to a specific value in kilobytes.
(19) Temporary values introduced by the compiler during common subexpression elimination are only used internally, and do not affect real variables. The name of the temporary variable ‘t’ shown above is only used as an illustration.
(20) In this case, the definition of the inline function must be made available to the other files (e.g. in a header file).
(21) Also referred to as "targeting" a specific processor.
In recent versions of GCC this option has been
-mtune. The older form
-mcpu will continue
On GNU/Linux systems, the command
cat /proc/cpuinfo will display information about the CPU.
(24) Intel has added support for this instruction set as the "Intel 64-bit enhancements" on their Xeon CPUs.
-maix32 are used on AIX.
(26) Motorola 68k processors also use extended precision registers, like the x86.
(27) For quantities held in the x87 extended-precision registers the relative precision is 5.42*10^-20 and the exponent range is 10^(+/-4932) . Standard double precision values have a relative precision of 2.22*10^-16 and an exponent range of 10^(+/-308) .
(28) The operating system saves and restores the control word when switching between processes, so that each process maintains its own setting.
MacOS X (Darwin) on
PowerPC uses signed
char, for consistency with other Darwin
There is also a subtle error even on
platforms with signed
char---the ASCII character 255
is spuriously interpreted as an end of file condition.
If displayed, character code 255 often appears as
appropriate paths can be set up in
gdb using the
ar does not require a prefix ‘-’ for its options.
(34) American Mathematical Monthly, Volume 92 (1985), 3--23
(35) As mentioned earlier, the preprocessor is integrated into the compiler in recent versions of GCC. Conceptually, the compilation process is the same as running the preprocessor as separate application.
(36) The MSB and LSB orderings are also known as big-endian and little-endian respectively (the terms originate from Jonathan Swift's satire "Gulliver's Travels", 1727).
(37) POSIX.1 (2003 edition), IEEE Std 1003.1-2003.
|ISBN 0954161793||An Introduction to GCC - for the GNU compilers gcc and g++||See the print edition|