Mailinglist Archive: opensuse-programming (36 mails)

< Previous Next >
Re: [suse-programming-e] Fwd: "Formal" solution: parser.y:7: error: `stderr' undeclared (first use in this function)
  • From: Andreas Jaeger <aj@xxxxxxx>
  • Date: Sat, 27 Aug 2005 15:55:59 +0200
  • Message-id: <m3k6i7iivk.fsf@xxxxxxxxxxx>
"Steven T. Hatton" <hattons@xxxxxxxxxxxxxxxxxx> writes:

> I posted this to gnu.gcc.help, but it seems worth asking on this list as well.
> Particularly since it was strongly suggested by participants that I read this
> book. This is on SuSE 9.3.
> --------------- Forwarded message (begin)
>
> Subject: "Formal" solution: parser.y:7: error: `stderr' undeclared (first use
> in this function)
> From: Hattuari <susudata@xxxxxxxxxxxxxxxxxx>
> Date: Sat, 27 Aug 2005 00:16:10 -0400
> Newsgroup: gnu.gcc.help
>
> I'm going through the Goat Book http://sources.redhat.com/autobook/, and
> when I followed the instructions on how to build the first example, I
> received the following message:
>
> Fri Aug 26 23:47:43:> make
> if gcc -DPACKAGE_NAME=\"\" -DPACKAGE_TARNAME=\"\" -DPACKAGE_VERSION=\"\"
> -DPACKAGE_STRING=\"\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"foonly\"
> -DVERSION=\"1.0\" -DYYTEXT_POINTER=1 -I. -I. -g -O2 -MT parser.o -MD
> -MP -MF ".deps/parser.Tpo" -c -o parser.o parser.c; \
> then mv -f ".deps/parser.Tpo" ".deps/parser.Po"; else rm -f
> ".deps/parser.Tpo"; exit 1; fi
> parser.y: In function `yyerror':
> parser.y:7: error: `stderr' undeclared (first use in this function)
> parser.y:7: error: (Each undeclared identifier is reported only once
> parser.y:7: error: for each function it appears in.)
> make: *** [parser.o] Error 1

Add
#include <stdio.h>

The source file is broken if it misses that,

Andreas
--
Andreas Jaeger, aj@xxxxxxx, http://www.suse.de/~aj
SUSE Linux Products GmbH, Maxfeldstr. 5, 90409 N├╝rnberg, Germany
GPG fingerprint = 93A3 365E CE47 B889 DF7F FED1 389A 563C C272 A126
< Previous Next >
Follow Ups
References