[erlang-bugs] Compile errors in beam/io.c on IRIX
Jesper Louis Andersen
jesper.louis.andersen@REDACTED
Fri Oct 29 15:55:26 CEST 2010
On Fri, Oct 29, 2010 at 3:21 PM, Jesper Louis Andersen
<jesper.louis.andersen@REDACTED> wrote:
>
> This change looks reasonable to me. I might be wrong, but I think this
> is what GCC is doing: assuming that void* aritmetic are 1-byte
> increments. If not, the code would probably not have worked as
> expected. I like the explicit behaviour. If Tuncer Ayaz or one of the
> Erlang/OTP devs does not change this into a topic branch, I'd happily
> volunteer to make it a topic branch on github.
>
It is a GCC extension, see
http://gcc.gnu.org/onlinedocs/gcc-4.5.1/gcc/Pointer-Arith.html#Pointer-Arith
which really sets the size of the pointer to 1 byte (thus also
enabling the use of sizeof() in the same vein). It can be made into a
warning with -Wpointer-arith if so desired.
Tuncer suggested that I go ahead, so unless you want to do it, ...
--
J.
More information about the erlang-bugs
mailing list