Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to turn on ansi-c checking in compiler?

Status
Not open for further replies.

xailer

Programmer
Nov 6, 2003
13
SI
Hi
Im using red hat 9.
I would like to turn on strict ansi-c compliance when using
compiler,so that code would only get compiled if it is
ansi-c compliant.I tried with $cc -ansi hello.c command,
but to no effect.

Can someone help me?

thank you
 
Well if you're using gcc (guessing that you are if you're using redhat)

gcc -ansi -pedantic -W -Wall -O2 prog.c
Will find an awful lot of stuff which isn't ANSI, which may be dubious and which may be wasteful.

--
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top