Article View: gnu.gcc.bug
Article #1689Gcc and X11 imake (2nd try)
From: Leigh B. Stoller
Date: Thu, 22 Sep 1988 17:25
Date: Thu, 22 Sep 1988 17:25
50 lines
1450 bytes
1450 bytes
Hi,
Here at the University of Utah we recently installed the gcc
compiler suite as the default on our BSD4.3 hp9000's. This caused a
problem in the X11 imake utility, which depends heavily on /lib/cpp.
The problem results from some of the Imakefiles having the following.
(see server/os/4.2bsd/Imakefile)
SpecialObjectRule(osinit.o, $(IRULESRC)/$(MACROFILE), -DADMPATH=\"$(FOO)/foo\")
When this file is run through gcc cpp, it has trouble with \". For example
the results of pcc cpp on:
#define foo(x) =x=
foo(\"$(BAR)/bar\")
is:
# 1 ""
=\"$(BAR)/bar\"=
while the results of gcc cpp are:
:3: unterminated macro call
:3: only 0 args to macro `foo'
# 1 ""
==
An alternative syntax for the for the Imakefiles could be:
#define foo(x) =x=
foo('"$(BAR)/bar"')
The single quotes produce the same results as escaping the double quotes.
The other solution would be to change gcc cpp to handle this case, as pcc
cpp does.
Either way is fine by me.
Thanks,
Leigh Stoller
Technical Details
Message-ID:
<8809221725.AA03064@morgan.utah.edu>Path:
arc1-ca.pugleaf.net!utzoo!telly!ddsw1!lll-winken!killer!mit-eddie!bloom-beacon!tut.cis.ohio-state.edu!CS.UTAH.EDU!stoller%morganShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!telly!ddsw1!lll-winken!killer!mit-eddie!bloom-beacon!tut.cis.ohio-state.edu!CS.UTAH.EDU!stoller%morgan From: stoller%morgan@CS.UTAH.EDU (Leigh B. Stoller) Newsgroups: gnu.gcc.bug Subject: Gcc and X11 imake (2nd try) Message-ID: <8809221725.AA03064@morgan.utah.edu> Date: 22 Sep 88 17:25:18 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 49