This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: Use "[warning enabled by default]" for default warnings
- From: Richard Biener <richard dot guenther at gmail dot com>
- To: Robert Dewar <dewar at adacore dot com>
- Cc: Arnaud Charlet <charlet at adacore dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>, Richard Sandiford <rdsandiford at googlemail dot com>
- Date: Mon, 10 Feb 2014 10:09:42 +0100
- Subject: Re: Use "[warning enabled by default]" for default warnings
- Authentication-results: sourceware.org; auth=none
- References: <87eh3c3vl1 dot fsf at talisman dot default> <20140209200926 dot GA4940 at adacore dot com> <52F7E0D2 dot 3070307 at adacore dot com> <87zjm02fy5 dot fsf at talisman dot default> <52F7E578 dot 8010805 at adacore dot com>
On Sun, Feb 9, 2014 at 9:30 PM, Robert Dewar <dewar@adacore.com> wrote:
> On 2/9/2014 3:23 PM, Richard Sandiford wrote:
>
>>> can't we just reword the one warning where there is an ambiguity to
>>> avoid the confusion, rather than creating such an earthquake, which
>>> as Arno says, really has zero advantages to Ada programmers, and clear
>>> disadvantages .. to me [enabled by default] is already awfully long!
>>
>>
>> Well, since the Ada part has been rejected I think we just need to
>> consider this from the non-Ada perspective. And IMO there's zero
>> chance that each new warning will be audited for whether the
>> "[enabled by default]" will be unambiguous. The fact that this
>> particular warning caused confusion and someone actually reported
>> it doesn't mean that there are no other warnings like that. E.g.:
>>
>> -fprefetch-loop-arrays is not supported with -Os [enabled by default]
>>
>> could also be misunderstood, especially if working on an existing codebase
>> with an existing makefile. And the effect for:
>>
>> pragma simd ignored because -fcilkplus is not enabled [enabled by
>> default]
>>
>> is a bit unfortunate. Those were just two examples -- I'm sure I could
>> pick more.
>
>
> Indeed, worrisome examples,
>
> a shorter substitute would be [default warning]
>
> ???
Or print nothing at all? After all [...] was supposed to tell people how
to disable the warning! If there isn't a way to do that ... maybe instead
print [-w]? hmm, all existing [...] are positive so we'd have to print
-no-w which doesn't exist. Bah. So there isn't a way to "negate" -w
on the commandline to only get default warnings enabled again.
Richard.
>>
>>
>> Thanks,
>> Richard
>>
>