On Sat, Jul 25, 2009 at 3:17 PM, Daniel Dunbar <span dir="ltr"><<a href="mailto:daniel@zuster.org">daniel@zuster.org</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Sat, Jul 25, 2009 at 9:04 AM, Sebastian<br>
Redl<<a href="mailto:sebastian.redl@getdesigned.at">sebastian.redl@getdesigned.at</a>> wrote:<br>
</div><div class="im">> Hi,<br>
><br>
> I just committed a patch that does correct validation of C-style casts<br>
> for C++. However, it is only correct as far as the standard is<br>
> concerned. Clang does more. To implement this, however, I need information.<br>
><br>
</div>> ...<br>
<div class="im">> 4) Are there formalized Objective-C semantics? Which casts are allowed,<br>
> which are disallowed? Which are implicit, and which, in Objective-C++,<br>
> should be allowed by static_cast and reinterpret_cast respectively?<br>
<br>
</div>Formalized, no. One general rule of thumb is that interface behave<br>
like pointers to structs, since this is historically their<br>
implementation. Of course, that doesn't always make a lot of sense so<br>
its mostly a good rule of thumb for what gcc will do, not what is<br>
necessarily best.</blockquote><div><br></div><div>There are a few people on this list who have lots of experience with ObjC and less with compilers.</div><div><br></div><div>If you can phrase your questions in terms of objective-C code, we can answer them.</div>
<div><br></div><div>-Ken</div></div>