llvm/llvm-gcc-4.2 svn still produces -Wformat/-Wformat-security

The current llvm/llvm-gcc-4.2 svn when built on
i686-apple-darwin9 still produces the bogus warnings...

f951: warning: command line option "-Wformat" is valid for C/C++/ObjC/ObjC++ but not for Fortran
f951: warning: command line option "-Wformat-security" is valid for C/C++/ObjC/ObjC++ but not for Fortran

whenc compling any code with gfortran. This causes the gfortran testsuite
in gcc-4.2 to fail any test for compilation errors. Can we get this fixed
before the llvm 2.5 release?
           Jack

Hi Jack,

Could you craft a patch for this? Not many of us compile gfortran on our boxes.

-bw

Hello, Bill

Could you craft a patch for this? Not many of us compile gfortran on
our boxes.

The intention is to have fortran frontend built by default for LLVM
2.5+ (on darwin). And this apple-local problem seems to be the only
show-stopper.

This whole "warning" thing is a huge pain in the b*tt. I just submitted a patch that would enable it by default only on Darwin machines. Please check it out and see if it helps you.

-bw

Could you craft a patch for this? Not many of us compile gfortran on
our boxes.

It's very easy to build (just add fortran to the list of languages), so...
why not? This would help catch changes that break non-C languages (these
seem to happen at every sync with Apple...).

Ciao,

Duncan.

We've started cracking down on these types of errors. I actually did what you suggested. And fortran built (Yay). :slight_smile:

I may introduce it into our buildbot setup at some point. I also need to include the LLVM-gcc testsuite into buildbot as well, but that's trickier.

-bw

Yay!

Thanks for doing this,

Duncan.

Hi Jack,

Because of the new changes and the fact that we have only 2 days
before branching for 2.5, please retest the Fortran front end as soon
as you can to see if the problem has been resolved.

Thanks!
-bw

Bill Wendling wrote:

Hi Jack,

Because of the new changes and the fact that we have only 2 days
before branching for 2.5, please retest the Fortran front end as soon
as you can to see if the problem has been resolved.

Hi Bill. Thanks for working on this!

Unfortunately, I'm getting this warning now:

   $ llvm-g++ helloworld.c
   cc1plus: warning: -Wformat-security ignored without -Wformat

I think you can fix it by applying the same #define trick to -Wformat-security that you did to -Wformat.

Nick

*grump* I just submitted a hack. Please let me know if it helps.

-bw