This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: module level flags
Daniel Jacobowitz wrote:
>
> On Sun, Sep 29, 2002 at 10:22:16AM -0700, Bruce Korb wrote:
> > Gabriel Dos Reis wrote:
> > > | If the standard says otherwise, then this construct:
> > > |
> > > | (mumble*)&stumble
> > > |
> > > | where 'stumble' is not of type 'mumble' must be deemed a
> > > | hard error.
> > >
> > > Not necessarily. The C abstract machine has a notion of "effective
> > > type" and "compatible type".
> >
> > By golly, YYSTYPE darn well better be compatible with
> > arbitrary pointers or there are real problems.
>
> What is a YYSTYPE? A union pointer? A char *? If it's a char *, as
> the language suggests it should be, then you're OK. If it's a union*
> you should be accessing the appropriate union member, not casting.
YYSTYPE is a bucket designed by YACC (Bison) to carry
either a pointer (of any sort) or a scalar.