[R] trouble using R Mathlib as standalone
Prof Brian Ripley
ripley at stats.ox.ac.uk
Tue Jan 15 17:39:21 CET 2002
You are using this in C++ code, not in C code.
`Actually', I don't think it is a good idea to include C headers in C++
code with -pedantic. C is not required to pass C++ -pedantic.
On Tue, 15 Jan 2002, Faheem Mitha wrote:
> On Tue, 15 Jan 2002, Prof Brian Ripley wrote:
> > On Tue, 15 Jan 2002, Faheem Mitha wrote:
> > > On Tue, 15 Jan 2002, Prof Brian Ripley wrote:
> > >
> > > > I think we need to consider renaming the R version of log1p to avoid
> > > > possible problems elsewhere. It is not a bug, as it does need to be
> > > > declared in Rmath.h on some ISO C systems. It just happens that both
> > > > glibc and MM used the same name for the same extension.
> > >
> > > Can you suggest a temporary workaround for this, so I can continue using
> > > -pedantic?
> >
> > You don't need workarounds for warnings, do you?
>
> Actually,
>
> g++-3.0 -c -Wall -pedantic -g rand.cc
>
> gives an error, not a warning.
>
> In file included from rand.cc:4:
> /usr/include/Rmath.h:520: declaration of `double log1p(double)' throws
> different exceptions
> /usr/include/bits/mathcalls.h:125: than previous declaration `double
> log1p(double) throw ()'
> make: *** [rand.o] Error 1
> Faheem.
>
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
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