mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-21 02:03:03 +00:00
Fix `%nonassoc and eof'.
* src/state.c (errs_dup): Aaaah! The failure was due to bytes which were not properly copied! Replace memcpy (res->errs, src->errs, src->nerrs); with memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0])); !!! * tests/regression.at (%nonassoc and eof): Adjust to newest Autotest: `.' is not in the PATH.
This commit is contained in:
13
ChangeLog
13
ChangeLog
@@ -1,3 +1,16 @@
|
|||||||
|
2002-01-27 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
|
Fix `%nonassoc and eof'.
|
||||||
|
|
||||||
|
* src/state.c (errs_dup): Aaaah! The failure was due to bytes
|
||||||
|
which were not properly copied! Replace
|
||||||
|
memcpy (res->errs, src->errs, src->nerrs);
|
||||||
|
with
|
||||||
|
memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
|
||||||
|
!!!
|
||||||
|
* tests/regression.at (%nonassoc and eof): Adjust to newest
|
||||||
|
Autotest: `.' is not in the PATH.
|
||||||
|
|
||||||
2002-01-27 Akim Demaille <akim@epita.fr>
|
2002-01-27 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
* tests/sets.at (AT_EXTRACT_SETS): New.
|
* tests/sets.at (AT_EXTRACT_SETS): New.
|
||||||
|
|||||||
@@ -364,9 +364,9 @@ save_reductions (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*--------------------.
|
/*---------------.
|
||||||
| Build STATES. |
|
| Build STATES. |
|
||||||
`--------------------*/
|
`---------------*/
|
||||||
|
|
||||||
static void
|
static void
|
||||||
set_states (void)
|
set_states (void)
|
||||||
|
|||||||
@@ -61,7 +61,7 @@ errs *
|
|||||||
errs_dup (errs *src)
|
errs_dup (errs *src)
|
||||||
{
|
{
|
||||||
errs *res = errs_new (src->nerrs);
|
errs *res = errs_new (src->nerrs);
|
||||||
memcpy (res->errs, src->errs, src->nerrs);
|
memcpy (res->errs, src->errs, src->nerrs * sizeof (src->errs[0]));
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -75,20 +75,20 @@ main (int argc, const char *argv[])
|
|||||||
AT_CHECK([bison input.y -o input.c])
|
AT_CHECK([bison input.y -o input.c])
|
||||||
AT_CHECK([$CC $CFLAGS $CPPFLAGS input.c -o input], 0, [], [ignore])
|
AT_CHECK([$CC $CFLAGS $CPPFLAGS input.c -o input], 0, [], [ignore])
|
||||||
|
|
||||||
AT_CHECK([input '0<0'])
|
AT_CHECK([./input '0<0'])
|
||||||
# FIXME: This is an actual bug, but a new one, in the sense that
|
# FIXME: This is an actual bug, but a new one, in the sense that
|
||||||
# no one has ever spotted it! The messages are *wrong*: there should
|
# no one has ever spotted it! The messages are *wrong*: there should
|
||||||
# be nothing there, it should be expected eof.
|
# be nothing there, it should be expected eof.
|
||||||
AT_CHECK([input '0<0<0'], [1], [],
|
AT_CHECK([./input '0<0<0'], [1], [],
|
||||||
[parse error, unexpected '<', expecting '<' or '>'
|
[parse error, unexpected '<', expecting '<' or '>'
|
||||||
])
|
])
|
||||||
|
|
||||||
AT_CHECK([input '0>0'])
|
AT_CHECK([./input '0>0'])
|
||||||
AT_CHECK([input '0>0>0'], [1], [],
|
AT_CHECK([./input '0>0>0'], [1], [],
|
||||||
[parse error, unexpected '>', expecting '<' or '>'
|
[parse error, unexpected '>', expecting '<' or '>'
|
||||||
])
|
])
|
||||||
|
|
||||||
AT_CHECK([input '0<0>0'], [1], [],
|
AT_CHECK([./input '0<0>0'], [1], [],
|
||||||
[parse error, unexpected '>', expecting '<' or '>'
|
[parse error, unexpected '>', expecting '<' or '>'
|
||||||
])
|
])
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user