tags:

views:

90

answers:

4

Can someone tell me in plan and simple terms what some of the more important features and options are for gcc and what they do? I look at the man pages and my head feels like exploding lol.

+1  A: 

You might want to read the manual on gcc options, that groups the options in meaningful ways, and includes precise descriptions of same.

Hasturkun
A: 

Good question, and it really does have an answer.

-Wall

gcc -Wall ... will add lots of useful warnings to make C a much safer language to program in.

Regarding the comments, sure, I like -Wall -Wno-parentheses and various other variations.

But someone starting out has to, well, start somewhere.

DigitalRoss
It also adds a lot of useless ones that hide the real problems. I find if I use -Wall I generally need 5-10 -Wno-... options to get rid of the spam.
R..
@R: not in my experience.
JeremyP
A: 

-O flag with a numeric value will tell the compiler which level of optimization to use when compiling

-pedantic will make sure your code is iso compliant

-o To specify the name of the target executable to generate (by default it's a.out)

-Wextra to add additional compiler warnings to -Wall

MadcapLaugher
A: 

You may want to check out http://tigcc.ticalc.org/doc/comopts.html

As others pointed out: If you are running some sort of unix you can usualy just write 'man gcc' (without quotes)

Waxhead