1 |
|
2003-06-01 Paul Eggert <eggert@twinsun.com> |
2 |
|
|
3 |
|
Don't pass C-only warning optins (e.g., -Wmissing-declarations) |
4 |
|
to g++, as GCC 3.3 complains if you do it. |
5 |
|
* configure.ac (WARNING_CXXFLAGS): New subst. Set it to |
6 |
|
everything that WARNING_CFLAGS has, except omit warnings |
7 |
|
not suitable for C++. |
8 |
|
(AC_PROG_CXX): Use this instead of AC_CHECK_PROGS([CXX], [g++]). |
9 |
|
* tests/atlocal.in (CXXFLAGS): New var. |
10 |
|
* tests/local.at (AT_COMPILE_CXX): Use it instead of CFLAGS. |
11 |
|
|
12 |
|
Fix a GLR parser bug I reported in February; see |
13 |
|
<http://mail.gnu.org/archive/html/bison-patches/2003-02/msg00008.html>. |
14 |
|
The problem was that GLR parsers did not conform to the C standard, |
15 |
|
because actions like { $1 = $2 + $3; } expanded to expressions |
16 |
|
that invoked YYFILL in separate subexpressions, and YYFILL assigned |
17 |
|
to a local variable. The C standard says that expressions |
18 |
|
like (var = f ()) + (var = f ()) have undefined behavior. |
19 |
|
Another problem was that GCC sometimes issues warnings that |
20 |
|
yyfill and its parameters are unused. |
21 |
|
|
22 |
|
* data/glr.c (yyfillin): Renamed from the old yyfill. Mark |
23 |
|
as possibly unused. |
24 |
|
(yyfill): New function. |
25 |
|
(YYFILL): Use it. |
26 |
|
(yyuserAction): Change type of yynormal to bool, so that it matches |
27 |
|
the new yyfill signature. Mark it as possibly unused. |
28 |
|
|
29 |
|
|
30 |
|
Follow up on a bug I reported in February, where a Bison-generated |
31 |
|
parser can loop. Provide a test case and a fix for yacc.c. I |
32 |
|
don't have a fix for lalr1.cc or for glr.c, unfortunately. |
33 |
|
The original bug report is in: |
34 |
|
<http://mail.gnu.org/archive/html/bison-patches/2003-02/msg00044.html> |
35 |
|
|
36 |
|
* data/yacc.c (YYERROR): Now just 'goto yyerrorlab', since the |
37 |
|
macro's size was becoming unwieldy. |
38 |
|
(yyerrlab): Do not discard an empty lookahead symbol, as this |
39 |
|
might destroy garbage. |
40 |
|
(yyerrorlab): New label, with the old contents of YYERROR, |
41 |
|
plus the following change: pop the stack of rhs corresponding |
42 |
|
to the production that invoked YYERROR. That is how Yacc |
43 |
|
behaves, and POSIX requires this behavior. |
44 |
|
(yyerrlab1): Use YYPOPSTACK instead of its definiens. |
45 |
|
* tests/calc.at (_AT_DATA_CALC_Y): Include unistd.h if available. |
46 |
|
Define 'alarm' to do nothing if unistd.h is not available. |
47 |
|
Add a new rule "exp: '-' error;" to test the above change to |
48 |
|
data/yacc.c. Use 'alarm' to abort any test taking longer than |
49 |
|
10 seconds, as it's probably looping. |
50 |
|
(AT_CHECK_CALC): Test recovery from error in new grammar rule. |
51 |
|
Also, the new yacc.c generates two fewer diagnostics for an |
52 |
|
existing test. |
53 |
|
|
54 |
2003-05-24 Paul Eggert <eggert@twinsun.com> |
2003-05-24 Paul Eggert <eggert@twinsun.com> |
55 |
|
|
56 |
* data/glr.c (YYSTACKEXPANDABLE): Do not evaluate |
* data/glr.c (YYSTACKEXPANDABLE): Do not evaluate |
60 |
-ansi -Wall -gall). |
-ansi -Wall -gall). |
61 |
* data/yacc.c (union yyalloc): Likewise. |
* data/yacc.c (union yyalloc): Likewise. |
62 |
(YYCOPY): Do not evaluate __GNUC__ unless it is defined. |
(YYCOPY): Do not evaluate __GNUC__ unless it is defined. |
63 |
|
|
64 |
Switch from 'int' to 'bool' where that makes sense. |
Switch from 'int' to 'bool' where that makes sense. |
65 |
|
|
66 |
* lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p, |
* lib/abitset.c (abitset_test, abitset_empty_p, abitset_equal_p, |