[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Diff to make core compile with gcc-4.1 prerelease
From: |
Gregory John Casamento |
Subject: |
Re: Diff to make core compile with gcc-4.1 prerelease |
Date: |
Fri, 7 Oct 2005 06:49:55 -0700 (PDT) |
David,
--- David Ayers <address@hidden> wrote:
> Richard Frith-Macdonald schrieb:
>
> > However, while this cast to union feature is non-standard anyway its
> > behavior is therefore hard to classify as a definite bug, I do think the
> > new behavior is non-intuitive, and it would be better if it handled
> > assignment of any pointer to a void* member and any object to an id
> > member, for consistency with the normal rules of C and ObjC.
>
> Agreed. Non-intuitive in both cases but consistent.
>
> > I guess the current rationale is probably that a union may have two or
> > more members which a value could be cast to using normal casting rules,
> > so it uses only exact matches to avoid any confusion ... but I think
> > casts to any element of equivalent type should be allowed.
>
> Well I could very much agree with the rationale if there is a case where
> this 'confusion' would lead to a code generation issue but I can't think
> of such a situation right now. This looks like a pure compile time type
> checking issue so it seems that at most I would have expected a warning.
>
> But you are right, as a gcc extension, it's whatever gcc maintainers
> want it to be.
So, should I commit my changes? Should we submit a bug to the gcc
maintainers?
> Cheers,
> David
Later, GJC
Gregory John Casamento
-- CEO/President Open Logic Corp. (A MD Corp.)
## Maintainer of Gorm (IB Equiv.) for GNUstep.
Re: Diff to make core compile with gcc-4.1 prerelease, Gregory John Casamento, 2005/10/07