Subject: Re: Generic LP64 define?
To: Eduardo Horvath <>
From: Chris G. Demetriou <>
List: tech-toolchain
Date: 08/02/2000 17:25:00 (Eduardo Horvath) writes:
> Now to detect a system that's LP64 we need to check a special define for
> each architecture.  [ ... ]
> If we start having 64-bit POWER/PPC, 64-bit MIPs, or ia64, these checks
> will quickly become unweildy.

So, one can look at these with an eye toward making them easier to do.

But when I see something which checks for LP64, I think "broken code."

I did a quick find in the sources (not quite current, and i didn't let
it run to completion), found two places which matched a grep for the
string you mentioned:



the latter seems like it would be better solved by using c9x-like
format specifiers (from systems headers) as appropriate, rather than
locally checking LP64-ness.

the former seems ... remarkably special.  I see no reason why we want
to be encouraging people to do things like that.

Are there examples where this type of check is actually a good thing
to be doing that my (admittedly incomplete) check of our sources
didn't find?  8-)