[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C99 in Bison
From: |
Akim Demaille |
Subject: |
Re: C99 in Bison |
Date: |
Mon, 31 Aug 2009 13:41:22 +0200 |
Le 28 août 09 à 18:55, Joel E. Denny a écrit :
Hi Akim.
Hi Joel,
On Fri, 28 Aug 2009, Akim Demaille wrote:
My quotation does not make it clear, but yysyntax_error is always
defined (and
used, even for "simple" messages), and always with this signature.
So that
one is really wrong.
yysyntax_error is disabled if YYERROR_VERBOSE is off:
% echo '%% start: ;' > tmp.y
% ./tests/bison tmp.y
% gcc -E tmp.tab.c | grep yysyntax_error
Bummer. Thanks. I was looking at lalr1.cc's, which has the
ERROR_VERBOSE dependency inside it, instead of leaving it on the call
site.
That gives no output unless I add %error-verbose to the grammar.
so I guess we can afford dropping knr in the generated skeletons,
without
polling in the NEWS (but we can inform in the NEWS of 2.4.2 that
2.5 will
completely drop KnR support in yacc.c, which was accidentally
broken anyway
since Bison 2.1). After all, old tarballs are still there.
I'd be willing to take that approach anyway. Like you said, if
someone
needs K&R, old Bisons are lying around:
% aptitude search -F %p bison | grep -v ++
bison
bison-1.35
bison-doc
Alternatively, we could poll at help-bison and might get an answer
faster.
Yes, but what's the size of the poll?
As for C90 in bison itself, I'm fine with it.
You mean C99, right?
Yes, sorry.
Yet C++03 would be better ;)
Why don't we discuss that again when at least 2.5 is released? Some
cherry picks are already painful.
Well, I would also like to release 2.6 not too late, so I would wait
for 2.6 to be released first.
Then again, I believe C++03 doesn't support all C99 constructs, such
as
variable length arrays.
It has std::vector.
So, if we're not careful about our C99 usage, we
might be making more work for whenever we switch to C++03.
I'm not sure it would require a lot of work.