<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">What exactly should be behavior be for this?<div><br></div><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><br></div><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><br></div><div>-Wc++98-compat-pedantic is enabled, C++11 is enabled, but -Wnewline-eof/-pedantic is not?</div><div><br></div><div>-Wc++98-compat-pedantic is enabled, C++11 is not enabled, -Wnewline-eof/-pedantic is enabled?</div><div><br></div><div><br></div><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. However with my current implementation this case emits a warning even when C++98 mode would not. This is because the C++98 compat warning I've implemented is <span class="Apple-style-span" style="font-size: 13px; ">InGroup<CXX98CompatPedantic> and has no relation to </span><span class="Apple-style-span" style="font-size: 13px; ">InGroup<DiagGroup<"newline-eof">>. 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?</span></div><div><span class="Apple-style-span" style="font-size: 13px; "><br></span></div><div><span class="Apple-style-span" style="font-size: 13px; ">The third case should obviously output a warning, and I'm not sure it matters all that much whether it's the C++98 compat warning or the normal newline-eof warning. Currently I'm outputting the normal warning, which seems like the right thing.</span></div><div><span class="Apple-style-span" style="font-size: 13px; "><br></span></div><div><span class="Apple-style-span" style="font-size: 13px; ">I've attached my current set of changes.</span></div><div><span class="Apple-style-span" style="font-size: 13px; "><br></span></div><div><span class="Apple-style-span" style="font-size: 13px; ">- Seth</span></div><div><br></div><div><br><div><div>On Apr 12, 2012, at 9:09 PM, Seth Cantrell wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Sure, I can do that.<div><br><div><div>On Apr 12, 2012, at 9:05 PM, Richard Smith wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div class="gmail_quote">On Thu, Apr 12, 2012 at 6:00 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">
Author: socantre<br>
Date: Thu Apr 12 20:00:34 2012<br>
New Revision: 154643<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=154643&view=rev" target="_blank">http://llvm.org/viewvc/llvm-project?rev=154643&view=rev</a><br>
Log:<br>
C++11 no longer requires files to end with a newline<br></blockquote><div><br></div><div>Do you fancy adding a -Wc++98-compat-pedantic warning for this? If not, let me know and I'll do it.</div><div><br></div><div>Thanks!</div>
<div>Richard</div></div>
</blockquote></div><br></div></div></blockquote></div></div></body></html>