[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: too many warnings from Bison CVS for Pike
From: |
Paul Eggert |
Subject: |
Re: too many warnings from Bison CVS for Pike |
Date: |
Fri, 10 Feb 2006 22:38:30 -0800 |
User-agent: |
Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) |
address@hidden writes:
> Dynamic C-parserstack. This is what is Bison implements if
> __cplusplus is not defined. However, this should work under C++ as
> well
Implementing that would be a feature enhancement, not a bug fix.
I doubt whether it's worth the maintenance hassle.
My advice, for someone who wants that sort of feature, is to use a
C++-oriented skeleton instead of trying to limp along with yacc.c.
yacc.c was not designed to work with C++, it does not work well with
C++, and I suspect it will never work well with C++.
> - Also, there is an error in the comment of the block right above:
> # if defined (__STDC__) || defined (__cplusplus)
> # include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
> # define YYSIZE_T size_t
> I think this comment is due to the compiler I formerly used,
No, it's because stdlib.h infringes on the C user's name space. If
you give bison -y a Posix-conforming yacc grammar, Bison normally
attempts to impose no restrictions on user names, other than reserving
YY* and yy*. Including <stdlib.h> violates that rule, because
stdlib.h defines names that begin with neither YY nor yy.
I doubt whether including <stdlib.h> is 100% innocuous in C++, but
that's not relevant here. yacc.c is designed for C, not C++, and its
comments are aimed at C, not at C++.
- Re: too many warnings from Bison CVS for Pike,
Paul Eggert <=
- Re: too many warnings from Bison CVS for Pike, Paul Eggert, 2006/02/13
- Re: too many warnings from Bison CVS for Pike, Hans Aberg, 2006/02/13
- Re: too many warnings from Bison CVS for Pike, Paul Eggert, 2006/02/13
- Re: too many warnings from Bison CVS for Pike, Hans Aberg, 2006/02/14
- Re: too many warnings from Bison CVS for Pike, Paul Eggert, 2006/02/14
- Re: too many warnings from Bison CVS for Pike, Hans Aberg, 2006/02/14
- Re: too many warnings from Bison CVS for Pike, Akim Demaille, 2006/02/20
- Re: too many warnings from Bison CVS for Pike, Hans Aberg, 2006/02/20
- Re: too many warnings from Bison CVS for Pike, Akim Demaille, 2006/02/20