20.09.2015 Views

Programming in C

Kochan - ProgramminginC

Kochan - ProgramminginC

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Command-L<strong>in</strong>e Options<br />

495<br />

Table C.2 Cont<strong>in</strong>ued<br />

Option Mean<strong>in</strong>g Example<br />

-Olevel Optimizes the code for execution speed gcc –O3 m1.c m2.c<br />

accord<strong>in</strong>g to the level specified by level, –o mathfuncs<br />

which can be 1, 2, or 3. If no level is specified,<br />

as <strong>in</strong> –O, then 1 is the default. Larger numbers<br />

<strong>in</strong>dicate higher levels of optimization, and<br />

might result <strong>in</strong> longer compilation times and<br />

reduced debugg<strong>in</strong>g capability when us<strong>in</strong>g a<br />

debugger like gdb.<br />

-std=standard Specifies the standard for C files. 1 Use c99 gcc –std=c99<br />

for ANSI C99 without the GNU extensions. mod1.c mod2.c<br />

-Wwarn<strong>in</strong>g Turns on warn<strong>in</strong>g messages specified by gcc –Werror<br />

warn<strong>in</strong>g. Useful options are all, to get mod1.c mod2.c<br />

optional warn<strong>in</strong>gs that might be helpful for<br />

most programs, and error, which turns all<br />

warn<strong>in</strong>gs <strong>in</strong>to errors, thereby forc<strong>in</strong>g you<br />

to correct them.<br />

1.The current default is gnu89 for ANSI C90 plus GNU extensions.Will be changed to gnu99<br />

(for ANSI C99 plus GNU extensions) once all C99 features are implemented.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!