NetBSD Problem Report #41160

From www@NetBSD.org  Mon Apr  6 15:42:16 2009
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id D83AF63B8C8
	for <gnats-bugs@gnats.netbsd.org>; Mon,  6 Apr 2009 15:42:15 +0000 (UTC)
Message-Id: <20090406154215.8DF9663B8A5@www.NetBSD.org>
Date: Mon,  6 Apr 2009 15:42:15 +0000 (UTC)
From: lidl@pix.net
Reply-To: lidl@pix.net
To: gnats-bugs@NetBSD.org
Subject: gcc 4.3.3 complains about flex generated files
X-Send-Pr-Version: www-1.0

>Number:         41160
>Category:       misc
>Synopsis:       gcc 4.3.3 complains about flex generated files
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    misc-bug-people
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 06 15:45:00 +0000 2009
>Closed-Date:    Sun Aug 14 19:52:48 +0000 2011
>Last-Modified:  Sun Aug 14 19:52:48 +0000 2011
>Originator:     Kurt Lidl
>Release:        Tnetbsd-5
>Organization:
>Environment:
SunOS lsl.pix.net 5.11 snv_110 i86pc i386 i86pc
(but the problem isn't there, it's in the netbsd-5 source tree!)

>Description:
When cross-building the netbsd-5 source tree, with a gcc 4.3.3
cross-compiler, numerous errors are thrown.  These warnings/errors
are not exposed by the in-tree gcc 4.1.2.

Ultimately, when NetBSD upgrades their toolchain, they will
need to be addressed.

One of the most common errors I've found is that most things
that use a flex-generated file will error out because the
static function "input" is defined in the generated file, but
never called.  Gcc 4.3.3 warns about this, and the default
compile rules treat warnings as errors.

The flex.skl file has a #ifdef YY_NO_INPUT around the function
definitions, but not the functions themselves.  Adding a similar
#ifdef around the unneeded routine allows several more programs
in the source tree to compile with gcc 4.3.3.

>How-To-Repeat:
Cross-compile the netbsd-5 tree with gcc 4.3.3.  Watch the build
fail when it hits one of these:

cc1: warnings being treated as errors
scan.c:1437: error: 'input' defined but not used
*** [scan.o] Error code 1
1 error


>Fix:
Patch flex.skl, then add -DYY_NO_INPUT to the relevant Makefiles.

If someone can find the time to apply the following patch, it would
be great if it could be pulled up to netbsd-5 too.

begin 644 flex.diffs.bz2
M0EIH.3%!629362ZNF$0 !T1?@% P?W______W^2_[]_J8 D?>[W W&5B,PP:
M &@   #F$T!H#1HPC08C3$R8F@PC0,@&3 2A&DVBFI/U1ZFU-&CTFCU!Z0
M#0&@  ]0BI[)J0-!H   &@ :      2FU1"34]1IH]0-J  R &C0-     YA
M- : T:,(T&(TQ,F)H,(T#(!DP"I(@@ $T": B;1-3]2?I!M)-#(-,GJ/4_4V
MJ?JCF#%Z3S\W)A,)_&UE5&W46JJ*D5*2G^J&< ]=%7E57PA&\($K*5"1)Z*V
MB1>E8YOF<H:4?:^[44UMF7C;#5NQ.WHO?&?1OOK,@Q8,%/RHI-A*4J$8(20@
M*"%4P+JN9,EF8""%'+H#C+K!3;RJQ5,>UE7VXZNVHJJ<+>3T#K4E<\*<U2E8
M#"I/2JDG+X[_*M.AUO[?O5A;WA@[:[.O3K+V=>[N_,-C[$11['%2\G]OQ>I^
MI@R>?;MJHE<F]7ZUF%N-77X!ZX.O"BM;U*JJK9ZUI<PI5%/@\L#YX6*5/92J
MG^:OD'4.R'O#G.?FLJJ]L3RJ=>H98X[WF_+QKC^FW1]>W-C@&YKKZV^&NI.-
MH!/*0A+]MR,Y33-"VHKM\^\IX#KFG? LDZ61!8&"M\:3J2"Z=O<T<7<T\#''
M%7G &U>]U<^KPM:)Q(R_)8 9LV97#8PV<C++*+%555BQ8MC5MGO/V(&4DW?4
M"0 $-TL-JJ(=@AF\F-M=H"E!06@^R=8A>)Z^WTV]5>KU^O"WBPK+%>V/LMC?
M&S+.^=7]$>52-;_!X@L'""5"NL<:60A22@I(3QLC"2$"!"I4"4I1[\%KU0>5
M![1Z_)#P>YS?51)[:@F\HFP$2W201."ZZ(EHEU%F]B4D?]#Y[ .;%(UZ#$$=
M!;'!_#<[AJW\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+0>%74%[3]%7T6,(["0RO]5]TENC@G=M.'USH:X?U;]!L,/MW
M1Y0=H4&:.(;MLW5*U1G.E.H=T=F$>;&#3-!B9$AI"ZJ8F!8\O"7@K2Q,IEO3
MQ-DEL<9C?78V8,,U%=F7"2<_9;F'.=SOL%EM>\V:98DFN@6B>4],230R,/4'
MCI;<S(,K3E(S#';UY'BFTD.VQJC7';X.[OQY8>%:;RV_-6L6B0XT&>?+I'.0
MV[<'A:^B)HXLNK+GCM'EXNAV8&G#=%SHL+5IS-V&6)G:FK$,?"][;Y?!_]8N
M2=Q4#ID++G0_4&4XZHRB*9?V7::O6)DEBDX-)X<N>U/&MOGKNUP5&7//3H"O
M?WVTAF>G9_3A.?=SW;<-AW:_#CA@8_WAI3;S/5VL^5-(6UPB_ \@U7K!"SZ0
MY<@[ X:8:Y- =NELS*Y89Z*JJYWPX8ER8M<\_,6EK%N'I1F=$:.KB:CEKC="
MCL\32&Z.!Z#2B,T/4&2HX[ZSONLUZ.RNMBNP--DNF/A#5?,,=&<9\N_;CB%C
M3; ,D='A.MOL]'CV^S7OPSZ'0MU,I52E2JE5*J54JI52N2]WAP' _K!HU\@=
M78&28[#%$]](R>,VVWX&UY[[-_X0D^#WYV_"DX_OWKS"A^!2/A1+*__%W)%.
'%"0+JZ81 -](

end

>Release-Note:

>Audit-Trail:
From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, misc-bug-people@netbsd.org, 
	gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Cc: 
Subject: Re: misc/41160: gcc 4.3.3 complains about flex generated files
Date: Mon, 6 Apr 2009 11:58:10 -0400

 On Apr 6,  3:45pm, lidl@pix.net (lidl@pix.net) wrote:
 -- Subject: misc/41160: gcc 4.3.3 complains about flex generated files

 Uudecode does not like this file.

 christos

From: "Kurt J. Lidl" <lidl@pix.net>
To: gnats-bugs@NetBSD.org
Cc: misc-bug-people@NetBSD.org, gnats-admin@NetBSD.org, netbsd-bugs@NetBSD.org
Subject: Re: misc/41160: gcc 4.3.3 complains about flex generated files
Date: Mon, 6 Apr 2009 13:18:11 -0400

 --n8g4imXOkfNTN/H1
 Content-Type: text/plain; charset=us-ascii
 Content-Disposition: inline

 On Mon, Apr 06, 2009 at 04:00:05PM +0000, Christos Zoulas wrote:
 > The following reply was made to PR misc/41160; it has been noted by GNATS.
 > 
 > From: christos@zoulas.com (Christos Zoulas)
 > To: gnats-bugs@NetBSD.org, misc-bug-people@netbsd.org, 
 > 	gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
 > Cc: 
 > Subject: Re: misc/41160: gcc 4.3.3 complains about flex generated files
 > Date: Mon, 6 Apr 2009 11:58:10 -0400
 > 
 >  On Apr 6,  3:45pm, lidl@pix.net (lidl@pix.net) wrote:
 >  -- Subject: misc/41160: gcc 4.3.3 complains about flex generated files
 >  
 >  Uudecode does not like this file.

 Hmmm.  I guess a cut and paste was probably a bad idea. The file
 should be attached to this email.  (Maybe having a way to do an
 attachement to the send-pr form would be helpful too?)

 -Kurt


 --n8g4imXOkfNTN/H1
 Content-Type: application/octet-stream
 Content-Disposition: attachment; filename="flex.diffs.bz2"
 Content-Transfer-Encoding: base64

 QlpoOTFBWSZTWS6umEQAB0RfgFAwf3//////3+S/79/qYAkfe73A3GViMwwaAGgAAADmE0Bo
 DRowjQYjTEyYmgwjQMgGTAShGk2impP1R6m1NGj0mj1B6QAADQGgAA9Qip7JqQNBoAAAGgAa
 AAAAAASm1RCTU9Rpo9QNqAAyAGjQNAAAAA5hNAaA0aMI0GI0xMmJoMI0DIBkwCpIggAE0CaA
 ibRNT9SfpBtJNDINMnqPU/U2qfqjmDF6Tz83JhMJ/G1lVG3UWqqKkVKSn+qGcA9dFXlVXwhG
 8IErKVCRJ6K2iRelY5vmcoaUfa+7UU1tmXjbDVuxO3ovfGfRvvrMgxYMFPyopNhKUqEYISQg
 KCFUwLquZMlmYCCFHLoDjLrBTbyqxVMe1lX246u2oqqcLeT0DrUlc8Kc1SlYDCpPSqknL47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1577N/4Qk+D352/Ck4/v3rzCh+BSPhRLK//F3JFOFCQLq6YRAA==

 --n8g4imXOkfNTN/H1--

From: Matthias Drochner <drochner@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/41160 CVS commit: src/usr.bin/lex
Date: Mon, 20 Apr 2009 16:01:18 +0000

 Module Name:	src
 Committed By:	drochner
 Date:		Mon Apr 20 16:01:18 UTC 2009

 Modified Files:
 	src/usr.bin/lex: flex.skl

 Log Message:
 if YY_NO_INPUT is defined, disable not only the declaration but also
 the definition of yyinput(), avoids compiler warnings with newer gcc.
 from Kurt J. Lidl per PR misc/41160, with a minor change to make it
 generate paired #directives in the "-+", ie c++, case


 To generate a diff of this commit:
 cvs rdiff -u -r1.22 -r1.23 src/usr.bin/lex/flex.skl

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Matthias Drochner <drochner@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/41160 CVS commit: src
Date: Mon, 20 Apr 2009 16:05:31 +0000

 Module Name:	src
 Committed By:	drochner
 Date:		Mon Apr 20 16:05:31 UTC 2009

 Modified Files:
 	src/bin/sh: Makefile
 	src/external/bsd/am-utils/bin/amd: Makefile
 	src/external/bsd/am-utils/bin/fsinfo: Makefile
 	src/games/atc: Makefile
 	src/gnu/usr.bin/binutils/gprof: Makefile
 	src/sbin/cgdconfig: Makefile
 	src/sbin/setkey: Makefile
 	src/usr.bin/fgen: Makefile
 	src/usr.bin/menuc: Makefile
 	src/usr.bin/mkcsmapper: Makefile
 	src/usr.bin/mkesdb: Makefile
 	src/usr.bin/msgc: Makefile
 	src/usr.sbin/envstat: Makefile
 	src/usr.sbin/isdn/isdnd: Makefile
 	src/usr.sbin/wsmoused: Makefile

 Log Message:
 define YY_NO_INPUT where appropriate, from Kurt J. Lidl per PR misc/41160


 To generate a diff of this commit:
 cvs rdiff -u -r1.84 -r1.85 src/bin/sh/Makefile
 cvs rdiff -u -r1.2 -r1.3 src/external/bsd/am-utils/bin/amd/Makefile
 cvs rdiff -u -r1.1 -r1.2 src/external/bsd/am-utils/bin/fsinfo/Makefile
 cvs rdiff -u -r1.26 -r1.27 src/games/atc/Makefile
 cvs rdiff -u -r1.5 -r1.6 src/gnu/usr.bin/binutils/gprof/Makefile
 cvs rdiff -u -r1.10 -r1.11 src/sbin/cgdconfig/Makefile
 cvs rdiff -u -r1.10 -r1.11 src/sbin/setkey/Makefile
 cvs rdiff -u -r1.6 -r1.7 src/usr.bin/fgen/Makefile
 cvs rdiff -u -r1.12 -r1.13 src/usr.bin/menuc/Makefile
 cvs rdiff -u -r1.5 -r1.6 src/usr.bin/mkcsmapper/Makefile
 cvs rdiff -u -r1.5 -r1.6 src/usr.bin/mkesdb/Makefile
 cvs rdiff -u -r1.16 -r1.17 src/usr.bin/msgc/Makefile
 cvs rdiff -u -r1.4 -r1.5 src/usr.sbin/envstat/Makefile
 cvs rdiff -u -r1.7 -r1.8 src/usr.sbin/isdn/isdnd/Makefile
 cvs rdiff -u -r1.6 -r1.7 src/usr.sbin/wsmoused/Makefile

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

From: Stephen Borrill <sborrill@netbsd.org>
To: gnats-bugs@gnats.NetBSD.org
Cc: 
Subject: PR/41160 CVS commit: [netbsd-5] src/usr.bin/lex
Date: Tue, 22 Dec 2009 15:34:40 +0000

 Module Name:	src
 Committed By:	sborrill
 Date:		Tue Dec 22 15:34:40 UTC 2009

 Modified Files:
 	src/usr.bin/lex [netbsd-5]: flex.skl initscan.c

 Log Message:
 Pull up the following revisions(s) (requested by hubertf in ticket #1197):
 	usr.bin/lex/flex.skl:	revision 1.23-125
 	usr.bin/lex/initscan.c:	revision 1.18

 If YY_NO_INPUT is defined, disable not only the declaration but also
 the definition of yyinput() to avoid compiler warnings with newer gcc.
 Addresses PR#41160.
 Introduce ANSI prototypes for yyinput.
 Conditionalize the yyinput/input() function definition the same way
 as it's always been done in the prototype.


 To generate a diff of this commit:
 cvs rdiff -u -r1.22 -r1.22.28.1 src/usr.bin/lex/flex.skl
 cvs rdiff -u -r1.17 -r1.17.40.1 src/usr.bin/lex/initscan.c

 Please note that diffs are not public domain; they are subject to the
 copyright notices on the relevant files.

State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sun, 14 Aug 2011 19:52:48 +0000
State-Changed-Why:
Committed in 2009


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.