From charnier@xp11.frmug.org  Mon May 12 14:10:49 1997
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 <FreeBSD-gnats-submit@freebsd.org>; 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 <charnier@xp11.frmug.org>
Reply-To: charnier@xp11.frmug.org
To: FreeBSD-gnats-submit@freebsd.org
Subject: shadowed declaration in groff
X-Send-Pr-Version: 3.2

>Number:         3585
>Category:       gnu
>Synopsis:       shadowed declaration in groff
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          closed
>Quarter:
>Keywords:
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Mon May 12 14:20:01 PDT 1997
>Closed-Date:    Mon May 26 23:12:58 PDT 1997
>Last-Modified:  Mon May 26 23:14:25 PDT 1997
>Originator:     Philippe Charnier
>Release:        FreeBSD 3.0-CURRENT i386
>Organization:
>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}
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: charnier 
State-Changed-When: Mon May 26 23:12:58 PDT 1997 
State-Changed-Why:  
fix applied in revision 2.3 of Makefile.inc 
>Unformatted:
