Bite Bytes
Bite Bytes

Reputation: 1513

What are the set of options to pass to gcc when compiling C89 code

I know about -ansi -pedantic-errors

Is there any other options to be as defensive as possible, in my code? I mean I don't want to miss any warnings or anything.

Upvotes: 0

Views: 98

Answers (1)

cse
cse

Reputation: 4104

If you don't want to miss any warnings or anything then, just use -std= switch. Use `-std=c89. Link gcc docs provided by GNU is having the information about different switch available. If you are using any other compiler then see the respective documents.

Upvotes: 2

Related Questions