[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: no $$ in %destructor = no unset value warnings?

From: Paul Eggert
Subject: Re: no $$ in %destructor = no unset value warnings?
Date: Fri, 15 Sep 2006 12:35:43 -0700
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

"Joel E. Denny" <address@hidden> writes:

> shouldn't Bison warn when there's %union or <...> usage in the
> grammar but a $$ without a type appears in a %destructor/%printer?

You mean, something like this?

     %union { char *p; }
     %token STRING
     %destructor { free ($$); } STRING

It would make sense to warn about this, yes, though as the C compiler
will generate a type error for this sort of thing it doesn't sound
that urgent.  (I can't think of an example where the C compiler
wouldn't warn, but perhaps I'm not thinking outside the box

reply via email to

[Prev in Thread] Current Thread [Next in Thread]