Use "[warning enabled by default]" for default warnings

Richard Sandiford rdsandiford@googlemail.com
Tue Feb 11 14:36:00 GMT 2014


Robert Dewar <dewar@adacore.com> writes:
>> I don't think gcc, g++, gfortran, etc, have ever made a commitment
>> to producing textually identical warnings and errors for given inputs
>> across different releases.  It seems ridiculous to require that,
>> especially if it stands in the way of improving the diagnostics
>> or introducing finer-grained -W control.
>>
>> E.g. Florian's complaint was that we shouldn't have warnings that
>> are not under the control of any -W options.  But by your logic
>> we couldn't change that either, because all those "[enabled by default]"s
>> would become "[-Wnew-option]"s.
>>
> I am not saying you can't change it, just that it is indeed a big
> earthquake. No of course there is no commitment not to make changes.
> But you have to be aware that when you make changes like this, the
> impact is very significant in real production environments, and
> gcc is as you know extensively used in such environments.
>
> What I am saying here is that this is worth some discussion on what
> the best approach is.

But what's the basis for that discussion going to be?  I first made this
suggestion on gcc@, which is the best list we have for getting user feedback,
and no user made this objection.  And when I worked in an environment
where I had direct contact with GCC-using customers, none of them gave
any indication that they were expecting textual stability between releases.
If you know of people who are using non-Ada languages this way then
please describe their set-up.  If you don't, how are we going to know
how such hypothetical users are going to react?  E.g. how many of those
users will have heard of "sed"?

I thought the trend these days was to move towards -Werror, so that for
many people the expected output is to get no warnings at all.  And bear
in mind that the kind of warnings that are not under -W control tend to
be those that are so likely to be a mistake that no-one has ever had an
incentive to make them optional.  I find it hard to believe that
significant numbers of users are not fixing the sources of those
warnings and are instead requiring every release of GCC to produce
warnings with a particular wording.

Thanks,
Richard



More information about the Gcc-patches mailing list