bison-patches
[Top][All Lists]
Advanced

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

Re: Dubious features


From: Paul Eggert
Subject: Re: Dubious features
Date: Wed, 07 Jun 2006 11:03:13 -0700
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Akim Demaille <address@hidden> writes:

> - Adding a trailing semi-colon
>
>   How about making a warning in 2.4, and removing the "feature" in
>   the future?

That sounds reasonable.  You're right that Posix doesn't require this
"feature", though it allows it.  By "making a warning" do you mean
that we just put a warning in NEWS about it, or something more
elaborate?


> - The "arbitrary C-code after %union".
>
>   This should follow the same path IMHO.
>   ...
>   I'm responsible for the second one, because that's how I used to trick
>   Bison to produce OK C++ code.

Are you talking about this change?  (If so, I bear part of the blame.  :-)

   2002-12-24  Paul Eggert  <address@hidden>

        %union directives can now have a tag before the `{', e.g., the
        directive `%union foo {...}' now generates the C code
        `typedef union foo { ... } YYSTYPE;'; this is for Yacc compatibility.

I just checked with Solaris 10 /usr/ccs/bin/yacc, and it allows
arbitrary C code (not just a single identifier) in that position.
So even if we added the feature for C++ code, there's a compatibility
argument for it as well, and we should probably leave it alone.




reply via email to

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