<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Ping ?</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; "> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">On Monday 29 July 2013 23:06:25 Arnaud Allard de Grandmaison wrote:<br /></p>
<p style=" margin-top:12px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">On Mon, Jul 29, 2013 at 7:00 PM, David Blaikie <<a href="mailto:dblaikie@gmail.com"><span style=" text-decoration: underline; color:#0057ae;">dblaikie@gmail.com</span></a>> wrote:<br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">The upcast/downcast tests might want to be codegen tests to ensure<br />that, not only do we not fail to compile it - but we compile it<br />correctly (not emitting any calls to RTTI stuff, etc).<br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Thanks David !</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">The test is now a codegen test, checking there is no call to __dynamic_cast --- and no diagnostics.</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Cheers,</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">--</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Arnaud</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:40px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"> </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:45px; margin-right:40px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Arnaud A. de GrandmaisonArnaud A. de GrandmaisonArnaud A. de GrandmaisonArnaud A. de Grandmaison<br />On Mon, Jul 29, 2013 at 9:48 AM, <br /><<a href="mailto:arnaud.adegm@gmail.com"><span style=" text-decoration: underline; color:#0057ae;">arnaud.adegm@gmail.com</span></a>> wrote:<br />> With the patch :)<br />><br />> On 07/29/2013 06:47 PM,  wrote:<br />>> On 07/29/2013 06:17 PM, Jean-Daniel Dupas wrote:<br />>>> Le 29 juil. 2013 à 17:52,  <<a href="mailto:arnaud.adegm@gmail.com"><span style=" text-decoration: underline; color:#0057ae;">arnaud.adegm@gmail.com</span></a>> a écrit :<br />>>><br />>>>> Clang emits an error when typeid is used with -fno-rtti, but does not<br />>>>> perform a similar check for dynamic_cast.<br />>>>><br />>>>> The attached patch implements the check.<br />>>>><br />>>>> I have done it late in 'CastOperation::CheckDynamicCast' , as some<br />>>>> dynamic_cast can be resolved statically, and will thus require no<br />>>>> support from the runtime, but we may also want to be more paranoïd.<br />>>>><br />>>>> Any thoughts ?<br />>>> If we want to support dynamic_cast without rtti when possible (as you do in your patch), you may add such case in the test to make sure clang accepts it.<br />>> Good point. I added a test for the 2 cases we accept (upcast, and cast<br />>> to same type).<br />>><br />>>> -- Jean-Daniel<br />>>><br />>>><br />>>><br />>>><br />>><br />><br />><br />> --<br />> <br />><br />><br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">> _______________________________________________<br />> cfe-commits mailing list<br />> <a href="mailto:cfe-commits@cs.uiuc.edu"><span style=" text-decoration: underline; color:#0057ae;">cfe-commits@cs.uiuc.edu</span></a><br />> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits"><span style=" text-decoration: underline; color:#0057ae;">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</span></a><br />><br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br /><br /></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">-- </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Arnaud A. de Grandmaison</p></body></html>