Programming in C

(Barry) #1
Command-Line Options 495

-Olevel Optimizes the code for execution speed gcc –O3 m1.c m2.c
according to the level specified by level, –o mathfuncs
which can be 1, 2, or 3. If no level is specified,
as in –O, then 1 is the default. Larger numbers
indicate higher levels of optimization, and
might result in longer compilation times and
reduced debugging capability when using a
debugger like gdb.
-std=standard Specifies the standard for C files.^1 Use c99 gcc –std=c99
for ANSI C99 without the GNU extensions. mod1.c mod2.c
-Wwarning Tu r ns on warning messages specified by gcc –Werror
warning. Useful options are all, to get mod1.c mod2.c
optional warnings that might be helpful for
most programs, and error, which turns all
warnings into errors, thereby forcing you
to correct them.

Ta ble C.2 Continued
Option Meaning Example

1.The current default is gnu89 for ANSI C90 plus GNU extensions.Will be changed to gnu99
(for ANSI C99 plus GNU extensions) once all C99 features are implemented.

22 0672326663 AppC 6/10/04 2:02 PM Page 495

Free download pdf