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: Use "[warning enabled by default]" for default warnings


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
>>
>


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