<p dir="ltr">I agree that off by default warnings are a "warning smell". But this doesn't look like a warning that's supposed to find bugs, it's more a language compliance thing, like -pedantic. Maybe it should be an ExtWarn. But is someone is actively implementing the suggested heuristics, we can wait and see how they do first, I suppose.</p>
<p dir="ltr">For the "final(a,b,c)" define: should we warn on that? It doesn't change the meaning of the keyword "final" since that doesn't have parameters.</p>
<div class="gmail_quote">On Dec 15, 2014 10:14 AM, "Aaron Ballman" <<a href="mailto:aaron@aaronballman.com">aaron@aaronballman.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Mon, Dec 15, 2014 at 1:01 PM, Serge Pavlov <<a href="mailto:sepavloff@gmail.com">sepavloff@gmail.com</a>> wrote:<br>
> Maybe turn this warning off by default? As Nico pointed out, there are<br>
> additional cases:<br>
><br>
> #define inline _inline<br>
<br>
I think this is fine to cover from my suggestions above. _inline is an<br>
extension just the same as __inline is.<br>
<br>
> #define final(a,b,c) some_computation(a, b,c )<br>
<br>
This *should* warn for modes where final is a keyword because it's<br>
overriding the keyword's behavior.<br>
<br>
I am not keen on off-by-default warnings. I think the general rule of<br>
thumb is that if it's not important enough to be on by default, it may<br>
not be important enough to include. Personally, I think this is<br>
borderline, but have a preference to see it remain on by default, with<br>
the proper heuristics.<br>
<br>
~Aaron<br>
<br>
><br>
> They are not covered by the rules above.<br>
><br>
> Thanks,<br>
> --Serge<br>
><br>
> 2014-12-15 23:45 GMT+06:00 Aaron Ballman <<a href="mailto:aaron@aaronballman.com">aaron@aaronballman.com</a>>:<br>
>><br>
>> On Mon, Dec 15, 2014 at 12:11 PM, Serge Pavlov <<a href="mailto:sepavloff@gmail.com">sepavloff@gmail.com</a>><br>
>> wrote:<br>
>> > 2014-12-15 22:32 GMT+06:00 Aaron Ballman <<a href="mailto:aaron@aaronballman.com">aaron@aaronballman.com</a>>:<br>
>> >><br>
>> >><br>
>> >> This commit appears to be lacking tests, and I would like to see some<br>
>> >> added for each of the new diagnostics, as well as for cases that<br>
>> >> should be valid (such as keywords in language modes that do not have<br>
>> >> the keyword).<br>
>> >><br>
>> >><br>
>> > Test are added in r224100.<br>
>><br>
>> So they are, thank you for pointing that out!<br>
>><br>
>> ~Aaron<br>
</blockquote></div>