This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PR 30437 [4.0/4.1/4.2/4.3 Regression] -Wno-all is rejected (try 2)


On 25/01/07, FX Coudert <fxcoudert@gmail.com> wrote:

 From what I see, there are three options to fix the problem:
   1. move -Wall to common.opt; I don't know why it would be so
difficult to do, but apparently Manuel tried and failed to work it out

I failed to make it work in a simple way. It can be done but requires substantially more work. I think that we would need to handle Wall in opts.c, then set some global variable (warn_all?) and each front-end would need to check the value of that variable at an appropriate place and do their thing according to its value. It will require changing all front-ends. It is a more intrusive change that the one that was committed.

2. what was done: make gfortran accept -Wall and -Wno-all

I still don't know what is wrong with that.


   3. remove the RejectNegative keyword in fortran/lang.opt so that
other front-ends don't choke on it, and declare that we don't want
the negative form to be used in gfortran and explicitly add an error
in that case

That is actually easier than what I have implemented. It could have saved me from preparing testcases for fortran. But since no one said anything in the bug report, not for the first version of the patch, not for the second version of the patch, I had no idea that you wanted that.

Now, for my personal opinion: I don't understand the reason of -Wno-
all, except maybe for completeness. I'd feel better with option 3,

Maybe to disable -Wall warnings? Maybe because a project CFLAGS have -Wall but you don't want to get warnings for a particular file, so you add -Wno-all when building that file? Why do we have Wno-* options at all then?

Anyway, completeness, the principle of least surprise or consistency
seem enough for me. But that is your call, not mine. Yet, gfortran was
breaking all the other front-ends.

So, Steve, would you mind explaining a bit your statement about
"incorrect and uncesseray"? It's not a trap or a trick question, I
just don't understand what you can mean by that.

Me neither. I could have easily implemented option 3 if that is what you really want for your users.

Again, if the patch was actually committed without approval, I can
revert it back while the situation is cleared. Or I can make a patch
for option 3. Just let me know.

Cheers,

Manuel.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]