<div dir="ltr">Please use isCXX98IntegralConstantExpr, not isIntegerConstantExpr, in C++11 + MicrosoftMode. (Take a look at how we behaved prior to r183883.) We *really* don't want to use full constexpr evaluation when determining whether an expression is a null pointer constant.<div>
<br></div><div>Also, this patch tries to evaluate value-dependent potential null pointer constants in C++11 + MicrosoftMode. That's not OK, and will sometimes assert. How should we behave here? Does MSVC accept this:</div>
<div><br></div><div>template<int N> int *f() { return N; }</div><div>int *p = f<0>();</div><div><br></div><div>?</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Aug 27, 2013 at 10:05 AM, Will Wilson <span dir="ltr"><<a href="mailto:will@indefiant.com" target="_blank">will@indefiant.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi All,<div><br></div><div>This patch uses the more relaxed integer expression codepath in Expr::isNullPointerConstant() when MicrosoftMode is enabled, this reflects MSVC behavior and is required to compile various cases I've come across in MSVC targeted code.</div>

<div><br></div><div>Test case included. Built and tested against latest code. Please review and commit if possible.</div><div><br></div><div>Thanks!</div><span class="HOEnZb"><font color="#888888"><div>Will.</div><div><div>
<br></div>-- <br><div dir="ltr"><div><span style="color:rgb(68,68,68);font-family:Arial,Helvetica,sans-serif"><b>Indefiant Ltd.</b></span></div>
</div>
</div></font></span></div>
<br>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br></div>