From: Paul Eggert Date: Thu, 27 May 2004 07:38:17 +0000 (+0000) Subject: * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug. X-Git-Tag: BISON-2_0~146 X-Git-Url: https://git.saurik.com/bison.git/commitdiff_plain/62cb8a9920995f43440c59fbc49967aea4f9559a * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug. * configure.ac (AC_PREREQ): Bump to 2.58. --- diff --git a/ChangeLog b/ChangeLog index e536978e..b772faf1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2004-05-27 Paul Eggert + + * src/parse-gram.y (lloc_default): Rewrite to avoid compiler bug + in SGI MIPSpro 7.4.1m. Problem reported by Albert Chin-A-Young in + . + + * configure.ac (AC_PREREQ): Bump to 2.58, since 2.57 doesn't work + (it fails with a Autoconf-without-aclocal-m4 diagnostic). + 2004-05-26 Paul Eggert * configure.ac (AM_GNU_GETTEXT_VERSION): Lower it from 0.14.1 to diff --git a/configure.ac b/configure.ac index 1160621b..34d1c6b6 100644 --- a/configure.ac +++ b/configure.ac @@ -17,8 +17,9 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA # 02111-1307 USA -# We need a recent Autoconf to run a recent Autotest. -AC_PREREQ(2.57) +# We need a recent Autoconf to avoid the message +# "autom4te: unknown language: Autoconf-without-aclocal-m4". +AC_PREREQ(2.58) AC_INIT([GNU Bison], [1.875e], [bug-bison@gnu.org]) AC_CONFIG_AUX_DIR([config]) diff --git a/src/parse-gram.y b/src/parse-gram.y index fa35eb64..0f81bf18 100644 --- a/src/parse-gram.y +++ b/src/parse-gram.y @@ -443,7 +443,11 @@ lloc_default (YYLTYPE const *rhs, int n) { int i; YYLTYPE loc; - loc.start = loc.end = rhs[n].end; + + /* SGI MIPSpro 7.4.1m miscompiles "loc.start = loc.end = rhs[n].end;". + The bug is fixed in 7.4.2m, but play it safe for now. */ + loc.start = rhs[n].end; + loc.end = rhs[n].end; /* Ignore empty nonterminals the start of the the right-hand side. Do not bother to ignore them at the end of the right-hand side,