[Rd] Re: [R] Nothing can be pasted...
gb
gb@stat.umu.se
Thu, 28 Sep 2000 18:21:32 +0200 (CEST)
On Thu, 28 Sep 2000, Luke Tierney wrote:
> Peter Dalgaard BSA wrote:
> > Prof Brian Ripley <ripley@stats.ox.ac.uk> writes:
> >
> > > > which I didn't see with RH6.2. However, R seems to run just fine
> > > > nevertheless. The offending line in config.h is
> > > >
> > > > #define DYNLOADEXT "." ## SHLIBEXT
> > > >
> > > > I'm not too familiar with C programming, but if ## SHLIBEXT
> > > > is meant as a comment, shouldn't it be surrounded by /* */?
> > >
> >
> > > I wonder if this is a problem with using a beta compiler?
> >
> > I certainly wouldn't put such a goof beyond RedHat, but it might be a
> > question of tighter standards compliance. What happens if the spaces
> > around ## are removed? (The error message might read as "can't paste
> > onto a whitespace token")
> >
>
> White space should be fine, from my reading of Harbison & Steele at least.
> The old KR way of doing token concatenation was
>
> #define CONCAT(x,y) x/**/y
>
> and there leaving white space would not work, but with the ## operator
>
> #define CONCAT(x,y) x##y
>
> and
>
> #define CONCAT(x,y) x ## y
>
> should be equivalent.
>
> Since the two bits are literal strings, it would also be possible to define
>
> #define DYNLOADEXT "." SHLIBEXT
This did the trick! But still this warning several times:
../../src/include/FFTab.h:40:29: warning: pasting would not give a valid
preprocessing token
(But different line numbers). Line 40:
{ F77_QSYMBOL(lminfl), F77_SYMBOL(lminfl)},
Göran
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-devel-request@stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._