From owner-freebsd-bugs Thu Jun 20 12:30:03 1996 Return-Path: owner-bugs Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id MAA03091 for bugs-outgoing; Thu, 20 Jun 1996 12:30:03 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id MAA03085; Thu, 20 Jun 1996 12:30:01 -0700 (PDT) Resent-Date: Thu, 20 Jun 1996 12:30:01 -0700 (PDT) Resent-Message-Id: <199606201930.MAA03085@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, ac199@freenet.hamilton.on.ca Received: from X3000 (ppp1654.on.sympatico.ca [206.172.249.118]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id MAA02991 for ; Thu, 20 Jun 1996 12:28:34 -0700 (PDT) Received: (from root@localhost) by X3000 (8.7.5/8.7.3) id BAA01232; Thu, 20 Jun 1996 01:18:45 -0400 (EDT) Message-Id: <199606200518.BAA01232@X3000> Date: Thu, 20 Jun 1996 01:18:45 -0400 (EDT) From: Tim.Vanderhoek@X3000 (ac199@freenet.hamilton.on.ca) Reply-To: ac199@freenet.hamilton.on.ca To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: bin/1337: yacc-generated parser generates a warning with -Wall Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >Number: 1337 >Category: bin >Synopsis: Yacc skeleton parser generates warning with -Wall >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Thu Jun 20 12:30:01 PDT 1996 >Last-Modified: >Originator: Tim Vanderhoek >Organization: League of the BYacc-Worshippers >Release: FreeBSD 2.2-960501-SNAP i386 >Environment: There's a desk, with false wood on top..yunno, the kind that's really a photograph-like-thing, and stairs a little to my left, but they're not very high (only 3 steps). It looks like they lead to the kitchen. >Description: Compiling a yacc-generated parser with -Wall will generate the warning: y.tab.c:999: warning: suggest parenthesis around assignment used as truth value >How-To-Repeat: See Description. >Fix: The following patch is relevant to -current as of date shown, *** skeleton.c Thu Jun 20 01:03:41 1996 --- oldskel.c Thu Jun 20 01:07:01 1996 *************** *** 145,151 **** " *yyssp = yystate = 0;", "", "yyloop:", ! " if ((yyn = yydefred[yystate])) goto yyreduce;", " if (yychar < 0)", " {", " if ((yychar = yylex()) < 0) yychar = 0;", --- 145,151 ---- " *yyssp = yystate = 0;", "", "yyloop:", ! " if (yyn = yydefred[yystate]) goto yyreduce;", " if (yychar < 0)", " {", " if ((yychar = yylex()) < 0) yychar = 0;", >Audit-Trail: >Unformatted: