[m-rev.] for review: bulk unify and compare

Zoltan Somogyi zoltan.somogyi at runbox.com
Tue Oct 2 13:53:51 AEST 2018



On Tue, 02 Oct 2018 13:42:24 +1000 (AEST), "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
> > > +#ifdef MR_INT_LEAST64_TYPE
> > 
> > If your intention was to use that macro to distinguish between 32- and 64-bit
> > systems, then that won't work.  (MR_INT_LEAST64_TYPE *will* be defined
> > on 32-bit systems so long as they also provide a 64-bit integer type.)
> 
> There are very few preprocessor tests for the size of words in the library.
> There is one in uint32.m, MR_INT_IS_32_BIT. It is not *exactly* what I want,
> since it not being set does not *guarantee* that int is 64 bit (it could be 16, or
> 128, or some non-power-of-2), but in practice, it ought to work. Do you agree?

Actually, scratch that. configure.ac already computes MR_BITS_PER_WORD,
we just do not keep it. I will add an entry to runtime/mercury_conf.h.in
to keep it, and use that.

Zoltan.


More information about the reviews mailing list