octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

alignment warnings on arm (was: Re: Octave 3.8.0-rc2 release candidate a


From: John W. Eaton
Subject: alignment warnings on arm (was: Re: Octave 3.8.0-rc2 release candidate available for ftp)
Date: Mon, 23 Dec 2013 13:46:43 -0500
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20131005 Icedove/17.0.9

On 12/22/2013 05:41 PM, Andreas Weber wrote:

./util/oct-locbuf.h: In member function
'octave_local_buffer<int>::operator int*() const':
./util/oct-locbuf.h:128:1: warning: cast from 'char*' to 'int*'
increases required alignment of target type [-Wcast-align]
./util/oct-locbuf.h: In member function 'octave_local_buffer<unsigned
int>::operator unsigned int*() const':
./util/oct-locbuf.h:129:1: warning: cast from 'char*' to 'unsigned int*'
increases required alignment of target type [-Wcast-align]
./util/oct-locbuf.h: In member function 'octave_local_buffer<long
int>::operator long int*() const':
./util/oct-locbuf.h:130:1: warning: cast from 'char*' to 'long int*'
increases required alignment of target type [-Wcast-align]
./util/oct-locbuf.h: In member function 'octave_local_buffer<long
unsigned int>::operator long unsigned int*() const':
./util/oct-locbuf.h:131:1: warning: cast from 'char*' to 'long unsigned
int*' increases required alignment of target type [-Wcast-align]
./util/oct-locbuf.h: In member function
'octave_local_buffer<float>::operator float*() const':
./util/oct-locbuf.h:132:1: warning: cast from 'char*' to 'float*'
increases required alignment of target type [-Wcast-align]

Does the attached patch avoid these warnings? Of course this change would need to be fixed up so that it won't cause trouble for non-GCC compilers. I just want to know whether it avoids the problem for you.

jwe


Attachment: diffs.txt
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]