*BSD News Article 21199


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!doc.ic.ac.uk!uknet!mcsun!news.forth.gr!news.forth.gr!vp
From: vp@nemesis.csi.forth.gr (Vassilis Prevelakis)
Newsgroups: comp.os.386bsd.bugs
Subject: Re: Problem with gcc-2.4.5 under 386BSD
Date: 20 Sep 1993 05:37:10 +0300
Organization: Institute of Computer Science, FORTH Hellas
Lines: 57
Message-ID: <vp.748492554@news.forth.gr>
References: <vp.748469140@news.forth.gr>
NNTP-Posting-Host: nemesis.csi.forth.gr

I have just installed gcc 2.4.5 on a 386BSD 386pc compatible and
while attempting to install InterViews 3.1 on that machine I
had problems making the makefiles using imake.  Briefly the problem
is caused by lots of extra spaces in the middle of filenames and
paths (e.g. $(SRC)/ clocktime.$(CCSUFFIX) and clocktime   .o)
                  ^^^ spaces causing havoc -----------^^^^^^
This turns out to be a feature (!!) of cccp (the gnu cpp) included
with gcc 2.4.5.  

I reported the problem in comp.os.386bsd.bugs  and got the following
responce:

> From: Jim Wilson <wilson@moria.cygnus.com>
> To: vp@nemesis.csi.forth.gr
> Subject: Re: Problem with gcc-2.4.5 under 386BSD
> Newsgroups: comp.os.386bsd.bugs
> In-Reply-To: <vp.748469140@news.forth.gr>
> Organization: Cygnus Support
> 
> In article <vp.748469140@news.forth.gr> you write:
> >bigus%  cat ttt
> >#define M(X)    .X.
> >M(O)
> >bigus%  /usr/libexec/cpp ttt
> ># 1 "ttt"
> >
> >. O .
----^-^----- the extra spaces I mentioned earlier (the old version of cpp
produced .O.
> 
> ANSI C requires this behaviour.  The processor is not allowed to combine
> tokens after substituting macro parameters, except when the ## operator
> is present.  Thus it is not a gcc bug.
> 
> I can certainly understand that this might be a problem who are trying
> to use the ANSI C preprocessor to preprocess inputs that aren't ANSI C,
> but then that is a somewhat questionable use of gcc's preprocessor
> anyways.
> 
> Jim
------------------------------------------
Well this sounds right and I am not prepared to comment on that,
I am just bringing this to the attention of everybody to save others
the time I wasted.

BTW I simply did a
	setenv IMAKECPP /usr/libexec/old/cpp
and make Makefiles completed with no probs

**vp

-----------------------------------
Vassilis Prevelakis   |       vp@csi.forth.gr
Thoukididou 10A       |   old style address:
Plaka, Athens 105 58  |       ...!mcvax!ariadne!vp
GREECE                |
Tel. +30 1 32 32 867  |   FAX +30 1 72 24 603