[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#119844: gcc: __WORDSIZE definition missing



On Fri, 16 Nov 2001, John R. Daily wrote:

> I should have provided more information. The bits/wordsize.h is
> included in a part of the file that is excluded for __GNUC__ >= 2.

I should've looked closer :-)  I totally missed the #if's around it :-)
You're right...according to the comment, it should be using an internal
__WORDSIZE definiton somehow.  Unusually, though, <stdint.h> explicitely
#includes bits/wordsize.h with no such conditions.  It's possible that
limits.h is just wrong, since it thinks that gcc's <limits.h> should be
handling this, but, for the most part, that header just points back to
/usr/include/limits.h.

> Judging by your response, then, this should be redirected to glibc?

I can't find any docs stating that gcc should be providing this value
during compilation.  A quick dump of i386, ppc, and alpha spec files shows
no such definition either.

IMO, this should definitely go to glibc, since it appears that glibc's own
headers disagree as to whether or not <bits/wordsize.h> should be
#included (stdint.h does it without restriction, limits.h has a
restriction of !__GNUC__ or __GNUC__ < 2).

I'm including Ben Collins in on this reply to get his ideas on this (he's
the glibc maintainer) before we decide where the bug should ultimately end
up.

Ben, the background of the discussion is that in /usr/include/limits.h,
bits/wordsize.h isn't #included, but __WORDSIZE is needed from it.  There
appear to be #if's around the #include in limits.h and the comments by it
claim that gcc is providing this value (first I've heard).  In stdint.h,
however, bits/wordsize.h is just #included without restriction.  Gcc's
limits.h and syslimits.h pretty much just refer back to
/usr/include/limits.h, so it's not providing this in 2.95.x nor in 3.0.x
(I haven't checked CVS, but even if it's new, the condition shouldn't
exclude gcc vers >=2).

Any ideas?  I'm leaning towards a header bug in glibc...

OH, btw, this affects at least alpha, ppc, and i386 (haven't checked the
rest yet).

C



Reply to: