[R] compiling R-0.90.0 on alpha-dec-osf4.0

Mitsuru Oka oka at debian.or.jp
Fri Nov 26 21:18:54 CET 1999


At Fri, 26 Nov 1999 20:33:01 +0100 (CET),
Kurt Hornik <Kurt.Hornik at ci.tuwien.ac.at> wrote:
> 
> >>>>> Mitsuru Oka writes:
> 
> > It's a prank of bison. Bison generate following code.
> 
> >   #ifndef __cplusplus
> >   #ifndef __STDC__
> >   #define const
> >   #endif
> >   #endif
> 
> > `SEXP mkString(const char *s)' is replaced to
> > `SEXP mkString(char *s)' by preprocessor.
> > And, cc compiler is too strict to ignore the difference
> > bettween type `char *' and `const char *' defined in Rinternals.h.
> 
> > `-std' option defines __STDC__, and then compile will be successful.
> > --
> 
> Albrecht Gebhardt had the same bug report a few days ago.  I don't quite
> understand what is going on.  configure checks (via AC_C_CONST) whether
> `const' works fine.  If not, it defines const as empty in Rdefines.h.
> This in turn gets included in all of our source files.  So how can it
> happen that const is empty in one place and not in another?

const work fine in alpha cc compiler, and mkString prototype
is parsed normally defined in Rinternals.h, but mkString
prototype in gram.c generated by bison is distorted by
preprocessor macro `const'.

--
Mitsuru Oka
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help 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-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list