Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 May 1997 22:10:27 +0200 (CEST)
From:      Philippe Charnier <charnier@xp11.frmug.org>
To:        FreeBSD-gnats-submit@FreeBSD.ORG
Subject:   gnu/3585: shadowed declaration in groff
Message-ID:  <199705122010.WAA18269@xp11.frmug.org>
Resent-Message-ID: <199705122120.OAA05730@hub.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199705122010.WAA18269>