<div class="gmail_quote">On Thu, Apr 12, 2012 at 7:32 PM, Seth Cantrell <span dir="ltr"><<a href="mailto:seth.cantrell@gmail.com">seth.cantrell@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">What exactly should be behavior be for this?</div></blockquote><div><br></div><div>The intent is that, if "-std=c++11 -Wc++98-compat-pedantic -pedantic" produces no warnings, then your code should also compile cleanly with "-std=c++98 -pedantic". "-Wc++98-compat" and "-Wc++98-compat-pedantic" are only intended to catch compatibility issues caused by differences between the current language and C++98, so should be a no-op if you are in C++98 mode. Hence:</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>If -Wc++98-compat-pedantic, C++11, and -Wnewline-eof/-pedantic are all enabled then obviously we want the C++98 compat pedantic warning.</div>
</div></blockquote><div><br></div><div>Yes.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>But what if</div><div>
<br></div><div>-Wc++98-compat-pedantic is enabled, but neither C++11 nor -Wnewline-eof/-pedantic is enabled?</div></div></blockquote><div><br></div><div>No warning: turning -Wc++98-compat-pedantic on in C++98 mode should have no effect.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>-Wc++98-compat-pedantic is enabled, C++11 is enabled, but -Wnewline-eof/-pedantic is not?</div>
</div></blockquote><div><br></div><div>Produce a warning here.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>
-Wc++98-compat-pedantic is enabled, C++11 is not enabled, -Wnewline-eof/-pedantic is enabled?</div></div></blockquote><div><br></div><div>No -Wc++98-compat-pedantic warning, but a 'no newline at end of file' warning instead.</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div>If only C++11 and -Wc++98-compat-pedantic are enabled I'd expect to get warnings out if and only if the same source would output warnings without C++11 enabled, given other options remaining the same.</div>
</div></blockquote><div><br></div><div>The -Wc++98-compat warnings (a subset of the -Wc++98-compat-pedantic warnings) behave that way.</div><div><div> </div></div><div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<div style="word-wrap:break-word">So, should -Wc++98-compat-pedantic be made to imply -pedantic, or is it okay for the first case to be silent while the second case emits a warning?</div></blockquote></div><div><br></div>
<div>I'd prefer to keep the 'your code would not be pedantically-correct C++98' and 'your code is not pedantically-correct C++11' flags controlling disjoint sets of warnings, even though I can't imagine any use cases where you would want the first but not the second. The graph of which warning groups contain which others is complex enough already (and -pedantic is already a very special case).</div>
<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word"><div><span style="font-size:13px">I've attached my current set of changes.</span></div>
</div></blockquote><div><br></div><div>LGTM :)</div></div>