From owner-freebsd-current Fri Feb 7 21:57:35 2003 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1BCA037B401 for ; Fri, 7 Feb 2003 21:57:34 -0800 (PST) Received: from dragon.nuxi.com (trang.nuxi.com [66.93.134.19]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4FCC143FAF for ; Fri, 7 Feb 2003 21:57:33 -0800 (PST) (envelope-from obrien@NUXI.com) Received: from dragon.nuxi.com (obrien@localhost [127.0.0.1]) by dragon.nuxi.com (8.12.6/8.12.2) with ESMTP id h185vQ8X006960; Fri, 7 Feb 2003 21:57:26 -0800 (PST) (envelope-from obrien@dragon.nuxi.com) Received: (from obrien@localhost) by dragon.nuxi.com (8.12.6/8.12.6/Submit) id h185uBDx006910; Fri, 7 Feb 2003 21:56:11 -0800 (PST) Date: Fri, 7 Feb 2003 21:56:11 -0800 From: "David O'Brien" To: Chad David Cc: current@freebsd.org Subject: Re: minor yacc warnings Message-ID: <20030208055611.GA6765@dragon.nuxi.com> Reply-To: obrien@freebsd.org Mail-Followup-To: David O'Brien , Chad David , current@freebsd.org References: <20030204042410.GA31903@colnta.acns.ab.ca> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20030204042410.GA31903@colnta.acns.ab.ca> User-Agent: Mutt/1.4i X-Operating-System: FreeBSD 5.0-CURRENT Organization: The NUXI BSD Group X-Pgp-Rsa-Fingerprint: B7 4D 3E E9 11 39 5F A3 90 76 5D 69 58 D9 98 7A X-Pgp-Rsa-Keyid: 1024/34F9F9D5 Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG The problem with this fix is it depends on a FreeBSD'ism -- "__unused". One must be able to take a generated parser and run it on non-FreeBSD systems. -Dlint really should be the way to avoid this warning. On Mon, Feb 03, 2003 at 09:24:10PM -0700, Chad David wrote: > We are having minor problems with a newer gcc generating warnings > for yacc due to yyrcsid not being used. Does anyone object to the > following patch to skeleton.c or have a better way of handling this? > -Dlint causes other problems. > > Thanks. > > -- > Chad David davidc@issci.ca > www.FreeBSD.org davidc@freebsd.org > ISSci Inc. Calgary, Alberta Canada > Index: skeleton.c > =================================================================== > RCS file: /mnt1/ncvs/src/usr.bin/yacc/skeleton.c,v > retrieving revision 1.34 > diff -u -d -r1.34 skeleton.c > --- skeleton.c 9 Apr 2002 11:39:05 -0000 1.34 > +++ skeleton.c 4 Feb 2003 04:10:14 -0000 > @@ -60,8 +60,9 @@ > const char *banner[] = > { > "#ifndef lint", > + "#include ", > "static char const ", > - "yyrcsid[] = \"$FreeBSD: src/usr.bin/yacc/skeleton.c,v 1.34 2002/04/09 11:39:05 ru Exp $\";", > + "yyrcsid[] __unused = \"$FreeBSD: src/usr.bin/yacc/skeleton.c,v 1.34 2002/04/09 11:39:05 ru Exp $\";", > "#endif", > "#include ", > "#define YYBYACC 1", To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message