[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #49055] Wcast-align warnings on certain non-x8
From: |
CH |
Subject: |
[Octave-bug-tracker] [bug #49055] Wcast-align warnings on certain non-x86 architectures |
Date: |
Thu, 30 Mar 2017 10:46:45 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:52.0) Gecko/20100101 Firefox/52.0 |
Follow-up Comment #4, bug #49055 (project octave):
After some testing and reasoning I now think method 2 is not commendable. So,
I implemented method 1, but using doubles instead of int64_t, as double is a
guaranteed native 64-bit data type. This entails very few changes in the
octave_chunk_buffer_class and ensures alignment of all allocated and locally
"allocated" buffers, as only multiples of 8-byte are assignable.
Note, that as before due to the reinterpret_cast the warnings may still occur.
I will test this later. I attached patches for oct-locbuf.cc and oct-locbuf.h
against octave-4.2.1. Thanks for considering these changes.
BTW: I think the current "align_mask" mechanism has no effect on the alignment
of the underlying memory, it just guarantees that the size is divisible by 8.
(file #40212, file #40213)
_______________________________________________________
Additional Item Attachment:
File name: oct-locbuf.h.patch Size:0 KB
File name: oct-locbuf.cc.patch Size:1 KB
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?49055>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/