* NEWS: %expect-violations are now just warnings, reverting

to Bison 1.30 and 1.75 behavior.  This fixes the GCC 3.2
bootstrapping problem reported by Matthias Klose; see
<http://mail.gnu.org/archive/html/bug-bison/2003-01/msg00053.html>.
* src/conflicts.c (conflicts_print): Likewise.
* tests/conflicts.at (%expect not enough, %expect too much,
%expect with reduce conflicts): Likewise.
* doc/bison.texinfo (Expect Decl): Document this.  Also mention
that the warning is enabled if the number of conflicts changes
(not necessarily increases).
This commit is contained in:
Paul Eggert
2003-01-13 06:41:29 +00:00
parent 8522c9ed2a
commit 69363a9e4d
4 changed files with 23 additions and 17 deletions

View File

@@ -1,5 +1,6 @@
# Exercising Bison on conflicts. -*- Autotest -*-
# Copyright (C) 2002 Free Software Foundation, Inc.
# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -485,9 +486,9 @@ AT_DATA([input.y],
exp: exp OP exp | NUM;
]])
AT_CHECK([bison -o input.c input.y], 1, [],
AT_CHECK([bison -o input.c input.y], 0, [],
[input.y: conflicts: 1 shift/reduce
input.y: expected 0 shift/reduce conflicts
input.y: warning: expected 0 shift/reduce conflicts
])
AT_CLEANUP
@@ -522,9 +523,9 @@ AT_DATA([input.y],
exp: exp OP exp | NUM;
]])
AT_CHECK([bison -o input.c input.y], 1, [],
AT_CHECK([bison -o input.c input.y], 0, [],
[input.y: conflicts: 1 shift/reduce
input.y: expected 2 shift/reduce conflicts
input.y: warning: expected 2 shift/reduce conflicts
])
AT_CLEANUP
@@ -542,8 +543,8 @@ program: a 'a' | a a;
a: 'a';
]])
AT_CHECK([bison -o input.c input.y], 1, [],
AT_CHECK([bison -o input.c input.y], 0, [],
[input.y: conflicts: 1 reduce/reduce
input.y: expected 0 reduce/reduce conflicts
input.y: warning: expected 0 reduce/reduce conflicts
])
AT_CLEANUP