[cfe-dev] GCC-specific, Clang-specific and ObjC-specific casts in C++
kenferry at gmail.com
Tue Jul 28 09:50:13 PDT 2009
On Sat, Jul 25, 2009 at 3:17 PM, Daniel Dunbar <daniel at zuster.org> wrote:
> On Sat, Jul 25, 2009 at 9:04 AM, Sebastian
> Redl<sebastian.redl at getdesigned.at> wrote:
> > Hi,
> > I just committed a patch that does correct validation of C-style casts
> > for C++. However, it is only correct as far as the standard is
> > concerned. Clang does more. To implement this, however, I need
> > ...
> > 4) Are there formalized Objective-C semantics? Which casts are allowed,
> > which are disallowed? Which are implicit, and which, in Objective-C++,
> > should be allowed by static_cast and reinterpret_cast respectively?
> Formalized, no. One general rule of thumb is that interface behave
> like pointers to structs, since this is historically their
> implementation. Of course, that doesn't always make a lot of sense so
> its mostly a good rule of thumb for what gcc will do, not what is
> necessarily best.
There are a few people on this list who have lots of experience with ObjC
and less with compilers.
If you can phrase your questions in terms of objective-C code, we can answer
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the cfe-dev