This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Patch: cast pointers to size_t (was Re: TYPE_HASH change)


On 18-Aug-2001, Richard Henderson <rth@redhat.com> wrote:
> 
> I suppose we could try and be even more proper and use C99
> uintptr_t, but that would mean autoconfing it, and I bet
> glibc is the only one that implements it at the moment.

FWIW: we tried doing that in the Mercury project, but autoconfing it
properly was more difficult than we first thought, and eventually after
several failed attempts we gave up and just used our own type names
`MR_uintptr_t', `MR_intptr_t', etc., to avoid various conflicts with
system header files.

For example, one such conflict was that we were checking for these types in
<stdint.h>, and Solaris 2.X.Y did not have <stdint.h>, so we were declaring the
types ourselves, but Solaris 2.X.Y did have <inttypes.h> and #includes that file
from <sys/types.h>, which conflicted with our definitions of intptr_t etc.

-- 
Fergus Henderson <fjh@cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]