[Top][All Lists]

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

Re: Dubious features

From: Akim Demaille
Subject: Re: Dubious features
Date: Thu, 8 Jun 2006 07:32:07 +0200

Le 7 juin 06 à 20:03, Paul Eggert a écrit :

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

The latter if doable...  That means having our scanner trace the
semiu-colons.  It should be doable.

- 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.


I don't think that we should accepted something that's not used, or
cannot be used.  Granted, it could be arbitrarily complex CPP
invocations that evaluate into a single id...  But is this really
something that is used?  How is output that stuff?

This thing is really troublesome.

BTW, what do you mean by arbitrary?  It stops at the first brace it
sees, even if it's in comment?  In a string?

reply via email to

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