This is the mail archive of the gcc@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]

Preprocessor arithmetic


Can someone explain to me what is wrong with CPP's arithmetic (as
referred to on the web page)?

All arithmetic in CPP is done in HOST_WIDEST_INT.  My understanding is
that this is the widest integer that GCC can support on the host;
which is usually twice the processor's native widest integer (itself
being HOST_WIDE_INT).

If I don't have it right so far, please correct me.

The standard defines intmax_t and uintmax_t as the "greatest width
integer types"; capable of representing any value of any (un)signed
type.  Preprocessor arithmetic should be done in these types.

These types seem to be the same thing to me.  What am I missing?

Neil.



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