From owner-freebsd-bugs Mon May 12 14:20:05 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.5/8.8.5) id OAA05749 for bugs-outgoing; Mon, 12 May 1997 14:20:05 -0700 (PDT) Received: (from gnats@localhost) by hub.freebsd.org (8.8.5/8.8.5) id OAA05730; Mon, 12 May 1997 14:20:02 -0700 (PDT) Resent-Date: Mon, 12 May 1997 14:20:02 -0700 (PDT) Resent-Message-Id: <199705122120.OAA05730@hub.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@FreeBSD.ORG, charnier@xp11.frmug.org Received: from frmug.org (frmug-gw.frmug.org [193.56.58.252]) by hub.freebsd.org (8.8.5/8.8.5) with ESMTP id OAA05205 for ; Mon, 12 May 1997 14:10:45 -0700 (PDT) Received: (from uucp@localhost) by frmug.org (8.8.5/8.8.5/frmug-2.0) with UUCP id XAA10610 for FreeBSD-gnats-submit@freebsd.org; Mon, 12 May 1997 23:09:10 +0200 (MET DST) Received: (from charnier@localhost) by xp11.frmug.org (8.8.5/8.8.5/xp11-uucp-1.1) id WAA18269; Mon, 12 May 1997 22:10:27 +0200 (CEST) Message-Id: <199705122010.WAA18269@xp11.frmug.org> Date: Mon, 12 May 1997 22:10:27 +0200 (CEST) From: Philippe Charnier Reply-To: charnier@xp11.frmug.org To: FreeBSD-gnats-submit@FreeBSD.ORG X-Send-Pr-Version: 3.2 Subject: gnu/3585: shadowed declaration in groff Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk >Number: 3585 >Category: gnu >Synopsis: shadowed declaration in groff >Confidential: no >Severity: serious >Priority: medium >Responsible: freebsd-bugs >State: open >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon May 12 14:20:01 PDT 1997 >Last-Modified: >Originator: Philippe Charnier >Organization: >Release: FreeBSD 3.0-CURRENT i386 >Environment: >Description: When compiling groff, there are lots of: c++ [options] -c .../groff/eqn/list.cc .../contrib/groff/eqn/list.cc: In method `int list_box::compute_metrics(int)': .../contrib/groff/eqn/list.cc:162: warning: variable `i' shadows local They are due to a new behaviour of g++ which is not compatible with groff. A comment about this can be found in NEWS/gcc.info. Justin reminded this in the -hackers list. Solution is to add -fno-for-scope in CFLAGS. >How-To-Repeat: cd /usr/src/gnu/usr.bin/groff ; make clean ; make >Fix: Because Makefile.inc gets included multiple times in some subdirs, -fno-for-scope is included multiple times in CFLAGS. OTOH, this is the minimal change. Index: Makefile.inc =================================================================== RCS file: /home2h/FreeBSD.cvsroot/src/gnu/usr.bin/groff/Makefile.inc,v retrieving revision 2.2 diff -u -r2.2 Makefile.inc --- Makefile.inc 1996/09/09 18:05:01 2.2 +++ Makefile.inc 1997/05/12 19:55:20 @@ -1,4 +1,5 @@ GROFF_DIST?= ${.CURDIR}/../../../../contrib/groff DIST_DIR= ${GROFF_DIST}/${.CURDIR:T} +CFLAGS+= -fno-for-scope .PATH: ${DIST_DIR} >Audit-Trail: >Unformatted: