Is there a cc equivalent to the -Wformat gcc flag?

254 views Asked by At

My company uses a massive makefile which uses CC to compile, not gcc. I would like to use the -Wformat flag to show errors where types in printf and sprintf don't match with the provided arguments.

Does anyone know a similar flag in CC which will provide this functionality? The task currently compiles fine, yet I know for a fact there are mismatched types in 100's of places, I need to find them.

I am compiling on Sun architecture.

Thanks!

2

There are 2 answers

0
rchrd On

Complete Solaris Studio cc and CC documentation is available at http://www.oracle.com/technetwork/server-storage/solarisstudio/documentation/index.html

There are also man pages cc(1) and CC(1) installed on your system. http://download.oracle.com/docs/cd/E18659_01/html/821-2676/cc.1.html

You might also run the source code thru lint(1) http://download.oracle.com/docs/cd/E18659_01/html/821-2676/lint.1.html

0
dimba On

I'm not familiar with Sun's cc, but if you're talking about 100 places, maybe it worth the effort to compile ith gcc