mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-22 10:43:02 +00:00
* src/reader.c (grammar_midrule_action): If $$ is set in a
mid-rule, move the `used' bit to its lhs. * tests/input.at (Unused values): New. * tests/actions.at (Exotic Dollars): Adjust: exp is not typed.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# Executing Actions. -*- Autotest -*-
|
||||
# Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||||
# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 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
|
||||
@@ -107,7 +107,7 @@ AT_DATA_GRAMMAR([[input.y]],
|
||||
};
|
||||
|
||||
%type <val> a_1 a_2 a_5
|
||||
exp sum_of_the_five_previous_values
|
||||
sum_of_the_five_previous_values
|
||||
|
||||
%%
|
||||
exp: a_1 a_2 { $<val>$ = 3; } { $<val>$ = $<val>3 + 1; } a_5
|
||||
@@ -146,7 +146,7 @@ main (void)
|
||||
}
|
||||
]])
|
||||
|
||||
AT_CHECK([bison -d -v -o input.c input.y], 0, [],
|
||||
AT_CHECK([bison -d -v -o input.c input.y], 0, [],
|
||||
[input.y:30.6-34.5: warning: unused value: $1
|
||||
input.y:30.6-34.5: warning: unused value: $2
|
||||
input.y:30.6-34.5: warning: unused value: $5
|
||||
|
||||
Reference in New Issue
Block a user