<div class="gmail_quote">If you would like to contribute a -Wformat-gnu set of warnings which flag use of format specifiers that are GNU extensions, I think that would be a very useful warning for Clang to have.</div><div class="gmail_quote">
<br></div><div class="gmail_quote">On Tue, Jan 24, 2012 at 3:15 PM, Joerg Sonnenberger <span dir="ltr"><<a href="mailto:joerg@britannica.bec.de">joerg@britannica.bec.de</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div id=":g9h">The problem is that it is about shutting up warnings for Linux (or OSX)<br>
specific code and at the same time stopping the warning for everyone<br>
else on code that needs them.</div></blockquote></div><br><div>We can't have it both ways though. We have to pick one behavior to be the default, and currently the largest users of Clang are on OSX or Linux and thus benefit from the default behavior you are observing. It's not a great way to choose a default, but neither is making warn by default for the majority of its users on code that is correct. =/ Again, I'm not really thrilled about it, but it seems pragmatic. It is at least consistent with -Wgnu and other extensions in Clang.</div>
<div><br></div><div>I don't think its too onerous to have to pass -Wformat-gnu to get more detailed warnings, any more than some folks pass -Wgnu to find out about language extensions in use.</div><div><br></div><div>
While it might be possible to make -Wformat include -Wformat-gnu when not compiling in one af the '-std=gnu*' language dialect variations, that would seem a really confusing bit of behavior. I like warning flags being simple set arithmetic.</div>