Fons Rademakers <Fons.Rademakers@cern.ch> writes:
> We compile on all compilers basically without warnings (and a few
> harmless warnings on some compilers). The pedantic is too pedantic. Over
> time we will go that way though, when other compilers give the same
> warnings in normal -Wall mode.
>
> Cheers, Fons.
>
>
> On Tue, 2002-04-16 at 12:51, David Chamont wrote:
> > Hi rooters,
> >
> > As said in the title, I encountered several problems with options "-ansi -pedantic"
> > with redhat6.1/gcc-2.95.2. Among them, problems with TMath.h and
> > lacking "template <>" in the dictionaries generated by rootcint.
> >
> > Are these problems known ?
> > Is there a solution ?
> > Or is there a plan to have a root version ansi-compliant ?
> >
> > David.
Hi,
I think the ansi non-compliant part of TMath.h is that there are
missing prototypes for functions __finite and __isnan.
(glibc-2.2.5, gcc-3.0, Debian/Linux/PPC)
#if defined(R__GNU) && defined(__STRICT_ANSI__)
# define finite __finite
# define isnan __isnan
#endif
and
inline Int_t TMath::Finite(Double_t x)
#ifdef R__HPUX11
{ return isfinite(x); }
#else
{ return finite(x); }
#endif
of TMath.h transform to
inline Int_t TMath::Finite(Double_t x)
{ return __finite(x); }
Adding prototypes for them should fix the problem (perhaps for
isfinite which is described by ISO C99).
cheers
--
Jiri
This archive was generated by hypermail 2b29 : Sat Jan 04 2003 - 23:50:50 MET