[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: redefined symbols issue
On Mon, 21 Apr 2014, Matt Thomas wrote:
> On Apr 21, 2014, at 3:29 AM, Anders Magnusson <ragge%ludd.ltu.se@localhost>
> > Iain Hibbert skrev 2014-04-20 20:07:
> >> Hello
> >> I found an issue when compiling NetBSD sources with pcc, which I am not
> >> sure where the 'fault' lies, as pcc handles this slightly differently than
> >> gcc (and clang) though the cause of it seems strange in its own right.
> >> The problem I face is that DBL_DIG, DBL_MAX, DBL_MIN, FLT_DIG, FLT_MAX and
> >> FLT_MIN are defined in <machine/limits.h> and <sys/float_ieee754.h> both,
> >> and during a build of (eg) libc/absvdi2.o, I get an error because they are
> >> defined slightly differently. For example, in <i386/limits.h> I see:
> >> #define DBL_DIG 15
> >> whereas in <sys/float_ieee754.h> there is effectively:
> >> #define DBL_DIG __DBL_DIG__
> > This is actually disallowed in C99 6.10.3 clause 1 and 2.
> > A redefinition must be literally identical to be allowed.
> I notice that pcc incorrectly defines __DBL_* and __FLT_* for vax.
I have added the correct values in the pcc repo (the way its done
currently needs some reworking)
> Everyone but vax now uses __xxx__ in <machine/limits.h>
btw this might be considered to fix http://gnats.netbsd.org/48187 ?
though, it could happen again the other way around, since in some cases
the sys/float_ieee754.h file defines using numerical values directly..
Main Index |
Thread Index |