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: Wmissing-base-class-initializer (PR7651 Define -Wextra strictly in terms of other warning flags)


On 09 Jan 2007 23:13:23 +0100, Gabriel Dos Reis
<gdr@integrable-solutions.net> wrote:

I would like to re-state a general concern I have made when reviewing some of your patches.


Thanks for paying attention to this. It seems not many people are interested on this area.

Yes, -Wextra should be split into sub-options.  No, we should not end
up with a situation where there is a one-to-one and onto mapping
between the -W options and any single diagnostic message we spit.  If we
arrive there, then we have failed to properly keep our user interface
from leaking implementation details (that may vary over releases).

I don't see how we are leaking implementation details. I do see that many users cannot use Wextra because they don't want to get the warning for "an unsigned value is compared against zero with < or >=" when they use a macro or a template.

I also do see that current warnings in Wextra are under-documented,
especially C++ warnings. I am no C++ expert and some of them mean
nothing to me (ambiguous virtual bases?). So please, take that into
account if I don't see some obvious logical subset.

-Wextra should be split into *logical* subsets.  I fully appreciate
the task is hard, but if we review only one option at a time, we may
very well miss the picture and end up leaking implementation detail
information.

I completely agree. I am trying to do this, so if you could point to logical subsets, I will happily fix the patches. Still, I think it would be easier to see the relations once Wextra is completely cleaned up. There is still a lot of time before GCC 4.3 is released and I think a lot of stuff could be improved in this area (and a lot of PRs about diagnostics could be fixed).

Unfortunately, most of Wextra warnings don't have anything to do with
each other (although some of them could be integrated into other
warnings, see http://gcc.gnu.org/ml/gcc-patches/2007-01/msg00440.html
which is also pending review).

What I don't want is to incorporate a controversial and hard to avoid
warning from Wextra (such as an unsigned value is compared against
zero with < or >=) into a generally useful and appreciated warning
such as Walways-true that is enabled by Wall. Given the description of
Walways-true, it may *logically* make sense but from the perspective
of our users it would be a disaster.

One way to do that is that we have a summary of the kind
of messages currently controlled by -Wextra.

I don't get this. There is a summary of warnings given by Wextra in gcc/doc/invoke.texi. One goal of my patches is to update the summary to reflect the current implementation.

I'm not saying this particular patch does that; I'm just expressing a
general concern I've already expressed when reviewing some of the
"break out" patches.

I do really appreciate that you are reviewing the patches (you are the only one that has reviewed them so far!) and I do really appreciate your feedback on any specific issue. Just let me know and I will fix it and resubmit.

Cheers,

Manuel.


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