[cfe-dev] new warnings
me22
me22.ca at gmail.com
Fri Sep 26 17:25:38 PDT 2008
On Thu, Sep 25, 2008 at 22:39, Mike Stump <mrs at apple.com> wrote:
>
> class DeclGroupRef {
> uintptr_t ThePtr;
>
>
> iterator begin() {
> if (getKind() == DeclKind)
> return ThePtr ? (Decl**) &ThePtr : 0;
>
> ? You think that is safe? Why? I don't see any unions, I don't see
> any memcpys, no character types.
>
That's a reinterpret_cast, so my understanding is that it's legal iff
ThePtr was originally set by a reinterpret_cast from something with
static type Decl**.
More information about the cfe-dev
mailing list