[m-rev.] for review: add builtin 8, 16 and 32 bit integer types -- Part 2

Julien Fischer jfischer at opturion.com
Mon Aug 21 17:49:50 AEST 2017


Hi,

On Mon, 21 Aug 2017, Zoltan Somogyi wrote:

> After doing a "git pull" of this change, I started getting warnings like this
> on my Linux laptop (which has gcc 4.8.1):
>
> erlang_rtti_implementation.c:6504:23: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
>           Int16_37 = ((int16_t) conv8_Int16_37);
>
>
> I get the warnings both when the .c file is generated by the compiler
> from before this change, and when it is generated by the compiler
> from after this change.
>
> The warning is for all casts from values of type MR_Box, which is defined
> as "void *" for the MLDS backend, to any signed or unsigned integer type
> smaller than a pointer.
>
> Julien, can you please add an intermediate cast to MR_Integer to such code?
> I expect you have the right place to do so paged in right now.

I've committed a fix for this and another problem that was causing
warnings.  (The major problem here, why clang is not generating all the
warnings on my system that GCC is on yours is as-yet unresolved.)

Are you planning to review Peter's fix for bug #411?

Julien.


More information about the reviews mailing list