-   Programming (
-   -   gcc flags? (

kalleanka 08-16-2007 07:25 AM

gcc flags?
what flags shall I use to get the hardest control/check of my code?

now I use -02 -g -ansi and it does not detect a lot of my awful programing like:


int i[2];


i[3] = 2;


I cant belive i do not get an error exept of a crash when I do run the prog.

kalleanka 08-16-2007 07:44 AM

ok the -Wall flag should be used. How about the -Wextra? Does anyone use this flag?

RichardS 08-16-2007 07:53 AM

Try the:

-fmudflap -fmudflapth -fmudflapir

They might help.

For runtime stuff valgrind does a good job of detecting heap problems. Here is a link about what it can do for you:

All times are GMT -5. The time now is 04:10 PM.