Article View: gnu.gcc.help
Article #52610Re: Small oddities encountered when building X11 R5 pl 12 with gcc 2.2.2
From: Rainer Klute
Date: Mon, 29 Jun 1992 08:23
Date: Mon, 29 Jun 1992 08:23
48 lines
2108 bytes
2108 bytes
In article <9206280057.AA06346@poseur.JPL.NASA.GOV>,
earle@poseur.jpl.nasa.gov writes:
|> I think that "yacc -d gram.y" will always create "gram.c" with these
|> un-ANSI
|> "extern char *malloc(), *realloc();" declarations if the "yacc" used
|> is not
|> ANSI-compatible. I got around the problem by manually re-generating
|> both
|> gram.c/gram.h with Sun's C 1.1 "ayacc"; it didn't create the offending
|> lines
|> like plain "yacc" does:
|> ...
I put the following hack into twm's Imakefile:
*** /tmp/RCSAa25489 Mon Jun 29 10:22:36 1992
--- Imakefile Tue Jun 23 13:31:54 1992
***************
*** 32,41 ****
--- 32,53 ----
ComplexProgramTarget(twm)
InstallNonExecFile(system.twmrc,$(TWMDIR))
+ #if HasGcc2
+
gram.h gram.c: gram.y
yacc $(YFLAGS) gram.y
+ sed -e '/extern char \*malloc(), \*realloc();/d' y.tab.c >gram.c
+ $(RM) y.tab.c
+ $(MV) y.tab.h gram.h
+
+ #else
+
+ gram.h gram.c: gram.y
+ yacc $(YFLAGS) gram.y
$(MV) y.tab.c gram.c
$(MV) y.tab.h gram.h
+
+ #endif
clean::
$(RM) y.tab.h y.tab.c lex.yy.c gram.h gram.c lex.c deftwmrc.c
--
Dipl.-Inform. Rainer Klute klute@irb.informatik.uni-dortmund.de
Univ. Dortmund, IRB
Postfach 500500 |)|/ Tel.: +49 231 755-4663
D-W4600 Dortmund 50 |\|\ Fax : +49 231 755-2386
Technical Details
Message-ID:
<12mhacINN5ra@fbi-news.Informatik.Uni-Dortmund.DE>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!Germany.EU.net!Informatik.Uni-Dortmund.DE!tommy!kluteReferences:
<9206280057.AA06346@poseur.JPL.NASA.GOV>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,e673592d3a3bec84 X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1992-06-28 19:58:22 PST Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!Germany.EU.net!Informatik.Uni-Dortmund.DE!tommy!klute From: klute@tommy.informatik.uni-dortmund.de (Rainer Klute) Newsgroups: gnu.gcc.help Subject: Re: Small oddities encountered when building X11 R5 pl 12 with gcc 2.2.2 Date: 29 Jun 1992 08:23:40 GMT Organization: University of Dortmund, Germany Lines: 48 Sender: klute@tommy (Rainer Klute) Distribution: gnu Message-ID: <12mhacINN5ra@fbi-news.Informatik.Uni-Dortmund.DE> References: <9206280057.AA06346@poseur.JPL.NASA.GOV> NNTP-Posting-Host: tommy