projects
/
bison.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
tests: honor TESTSUITEFLAGS in all the check targets.
[bison.git]
/
etc
/
bench.pl.in
diff --git
a/etc/bench.pl.in
b/etc/bench.pl.in
index 85f9de0fe4b3d3a85f1776b1ef431a3b65e94475..4d480d5eb751ade756396536f292797f83c3f318 100755
(executable)
--- a/
etc/bench.pl.in
+++ b/
etc/bench.pl.in
@@
-1,6
+1,6
@@
#! /usr/bin/perl -w
#! /usr/bin/perl -w
-# Copyright (C) 2006, 2008-201
1
Free Software Foundation, Inc.
+# Copyright (C) 2006, 2008-201
2
Free Software Foundation, Inc.
#
# This file is part of Bison, the GNU Compiler Compiler.
#
#
# This file is part of Bison, the GNU Compiler Compiler.
#
@@
-134,8
+134,8
@@
sub calc_grammar ($$$)
or die;
print $out <<EOF;
%{
or die;
print $out <<EOF;
%{
+#include <assert.h>
#include <stdio.h>
#include <stdio.h>
-
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
@@
-291,9
+291,8
@@
yylex (void)
static int
power (int base, int exponent)
{
static int
power (int base, int exponent)
{
+ assert (0 <= exponent);
int res = 1;
int res = 1;
- if (exponent < 0)
- exit (3);
for (/* Niente */; exponent; --exponent)
res *= base;
return res;
for (/* Niente */; exponent; --exponent)
res *= base;
return res;