mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-18 16:53:02 +00:00
* bootstrap (gnulib_modules): Add verify.
* lib/.cvsignore: Add verify.h. * src/getargs.c: Use ARGMATCH_VERIFY rather than verify. * src/system.h (verify): Remove. Include verify.h instead. * src/tables.c (tables_generate): Use new API for 'verify'.
This commit is contained in:
@@ -1,3 +1,12 @@
|
|||||||
|
2005-09-26 Paul Eggert <eggert@cs.ucla.edu>
|
||||||
|
|
||||||
|
* bootstrap (gnulib_modules): Add verify.
|
||||||
|
* lib/.cvsignore: Add verify.h.
|
||||||
|
* src/getargs.c: Use ARGMATCH_VERIFY rather than verify.
|
||||||
|
* src/system.h (verify): Remove.
|
||||||
|
Include verify.h instead.
|
||||||
|
* src/tables.c (tables_generate): Use new API for 'verify'.
|
||||||
|
|
||||||
2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
|
2005-09-21 Paul Eggert <eggert@cs.ucla.edu>
|
||||||
|
|
||||||
* tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
|
* tests/local.at (_AT_BISON_OPTION_PUSHDEFS): Do not use
|
||||||
|
|||||||
@@ -109,6 +109,7 @@ stdbool
|
|||||||
stdio-safer
|
stdio-safer
|
||||||
stpcpy
|
stpcpy
|
||||||
unistd-safer
|
unistd-safer
|
||||||
|
verify
|
||||||
xalloc
|
xalloc
|
||||||
xalloc-die
|
xalloc-die
|
||||||
xstrndup
|
xstrndup
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ strnlen.h
|
|||||||
unistd--.h
|
unistd--.h
|
||||||
unistd-safer.h
|
unistd-safer.h
|
||||||
unlocked-io.h
|
unlocked-io.h
|
||||||
|
verify.h
|
||||||
xalloc-die.c
|
xalloc-die.c
|
||||||
xalloc.h
|
xalloc.h
|
||||||
xmalloc.c
|
xmalloc.c
|
||||||
|
|||||||
@@ -103,11 +103,11 @@ static const int trace_types[] =
|
|||||||
trace_all
|
trace_all
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ARGMATCH_VERIFY (trace_args, trace_types);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
trace_argmatch (char *args)
|
trace_argmatch (char *args)
|
||||||
{
|
{
|
||||||
verify (trace_constraint, ARGMATCH_CONSTRAINT (trace_args, trace_types));
|
|
||||||
if (args)
|
if (args)
|
||||||
{
|
{
|
||||||
args = strtok (args, ",");
|
args = strtok (args, ",");
|
||||||
@@ -156,11 +156,11 @@ static const int report_types[] =
|
|||||||
report_all
|
report_all
|
||||||
};
|
};
|
||||||
|
|
||||||
|
ARGMATCH_VERIFY (report_args, report_types);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
report_argmatch (char *args)
|
report_argmatch (char *args)
|
||||||
{
|
{
|
||||||
verify (report_constraint, ARGMATCH_CONSTRAINT (report_args, report_types));
|
|
||||||
args = strtok (args, ",");
|
args = strtok (args, ",");
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -30,9 +30,6 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
|
||||||
/* Verify a requirement at compile-time (unlike assert, which is runtime). */
|
|
||||||
#define verify(name, assertion) struct name {char name[(assertion) ? 1 : -1];}
|
|
||||||
|
|
||||||
#if HAVE_SYS_TYPES_H
|
#if HAVE_SYS_TYPES_H
|
||||||
# include <sys/types.h>
|
# include <sys/types.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -54,6 +51,7 @@
|
|||||||
typedef size_t uintptr_t;
|
typedef size_t uintptr_t;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <verify.h>
|
||||||
#include <xalloc.h>
|
#include <xalloc.h>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -810,9 +810,8 @@ tables_generate (void)
|
|||||||
/* This is a poor way to make sure the sizes are properly
|
/* This is a poor way to make sure the sizes are properly
|
||||||
correlated. In particular the signedness is not taken into
|
correlated. In particular the signedness is not taken into
|
||||||
account. But it's not useless. */
|
account. But it's not useless. */
|
||||||
verify (sizes_are_properly_correlated,
|
verify (sizeof nstates <= sizeof nvectors
|
||||||
(sizeof nstates <= sizeof nvectors
|
&& sizeof nvars <= sizeof nvectors);
|
||||||
&& sizeof nvars <= sizeof nvectors));
|
|
||||||
|
|
||||||
nvectors = state_number_as_int (nstates) + nvars;
|
nvectors = state_number_as_int (nstates) + nvars;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user