NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

misc/41160: gcc 4.3.3 complains about flex generated files



>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:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Apr 06 15:45:00 +0000 2009
>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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