From 845351c44038f6476c8452e0d9823e8bc1014dc5 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Wed, 9 Jul 2008 13:56:11 +0000 Subject: Incorporate Otto's yacc skeleton fix. --- gnu/usr.bin/perl/perly.c | 5 ++++- gnu/usr.bin/perl/x2p/a2p.c | 15 ++++++++++++--- 2 files changed, 16 insertions(+), 4 deletions(-) (limited to 'gnu/usr.bin/perl') 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: -- cgit v1.2.3