From: millert Date: Wed, 9 Jul 2008 13:56:10 +0000 (+0000) Subject: Incorporate Otto's yacc skeleton fix. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=26f19fd61808692f15012a515561d99796ccf4ac;p=openbsd Incorporate Otto's yacc skeleton fix. --- diff --git a/gnu/usr.bin/perl/perly.c b/gnu/usr.bin/perl/perly.c index 378b9667682..0e8e9cb1e77 100644 --- a/gnu/usr.bin/perl/perly.c +++ b/gnu/usr.bin/perl/perly.c @@ -1596,7 +1596,10 @@ yyreduce: yystate, yyn, yyrule[yyn]); #endif yym = yylen[yyn]; - yyval = yyvsp[1-yym]; + if (yym) + yyval = yyvsp[1-yym]; + else + memset(&yyval, 0, sizeof(yyval)); switch (yyn) { case 1: diff --git a/gnu/usr.bin/perl/x2p/a2p.c b/gnu/usr.bin/perl/x2p/a2p.c index 1098b1e6867..27858e71352 100644 --- a/gnu/usr.bin/perl/x2p/a2p.c +++ b/gnu/usr.bin/perl/x2p/a2p.c @@ -10,7 +10,7 @@ static const char yysccsid[] = "@(#)yaccpar 1.9 (Berkeley) 02/21/93"; extern int yyparse(void); #define YYPREFIX "yy" #line 2 "a2p.y" -/* $RCSfile: a2p.y,v $$Revision: 4.1 $$Date: 92/08/07 18:29:12 $ +/* $RCSfile: a2p.c,v $$Revision: 1.9 $$Date: 2008/07/09 13:54:44 $ * * Copyright (C) 1991, 1992, 1993, 1994, 1996, 1997, 1999, 2000, * by Larry Wall and others @@ -18,7 +18,13 @@ extern int yyparse(void); * You may distribute under the terms of either the GNU General Public * License or the Artistic License, as specified in the README file. * - * $Log: a2p.y,v $ + * $Log: a2p.c,v $ + * Revision 1.9 2008/07/09 13:54:44 millert + * Incorporate Otto's yacc skeleton fix. + * + * Revision 1.8 2006/03/28 19:23:15 millert + * merge in perl 5.8.8 + * */ #include "INTERN.h" @@ -2312,7 +2318,10 @@ yyreduce: YYPREFIX, yystate, yyn, yyrule[yyn]); #endif yym = yylen[yyn]; - yyval = yyvsp[1-yym]; + if (yym) + yyval = yyvsp[1-yym]; + else + memset(&yyval, 0, sizeof(yyval)); switch (yyn) { case 1: