Where to get the code for gcc -Wall

View: New views
2 Messages — Rating Filter:   Alert me  

Where to get the code for gcc -Wall

by shanky :: Rate this Message:

| View Threaded | Show Only this Message

Hi all,

When we pass variable arguments to printf , and compiles the code it compiles without any problem but when we use -Wall options it catch the mismatch. I just want to know where I can found that piece of code which does this all checking.

Thanks
Shanky

Re: Where to get the code for gcc -Wall

by Ian Lance Taylor-3 :: Rate this Message:

| View Threaded | Show Only this Message

shanky <shashank.gugalia@...> writes:

> When we pass variable arguments to printf , and compiles the code it
> compiles without any problem but when we use -Wall options it catch the
> mismatch. I just want to know where I can found that piece of code which
> does this all checking.

This particular warning is -Wformat, which is turned on by -Wall.  The
code to implement -Wformat is mostly in the file gcc/c-format.c.

Ian