[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #45411] cast fail at liboctave/util/oct-inttyp
From: |
Tatsuro MATSUOKA |
Subject: |
[Octave-bug-tracker] [bug #45411] cast fail at liboctave/util/oct-inttypes.h on Sparc Solaris |
Date: |
Fri, 26 Jun 2015 02:53:06 +0000 |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/43.0.2357.130 Safari/537.36 |
URL:
<http://savannah.gnu.org/bugs/?45411>
Summary: cast fail at liboctave/util/oct-inttypes.h on Sparc
Solaris
Project: GNU Octave
Submitted by: tmacchant
Submitted on: 2015年06月26日 02時53分02秒
Category: Configuration and Build System
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Build Failure
Status: None
Assigned to: None
Originator Name: Tatsuro MATUOKA
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: 3.8.2
Operating System: Solaris/SunOS
_______________________________________________________
Details:
This is originally discussed at
http://octave.1599824.n4.nabble.com/Compile-error-at-compiling-liboctave-array-Array-b-cc-due-to-quot-cannot-be-overloaded-octave-int-ch-td4671122.html
by Michele31415.
*********************
The environments etcs.
Sparc Solaris , gcc-4.9.2
Octave 3.8.2 (4.0.0 may give the same error)
Compiling source file: liboctave/array/Array-b.cc
Place error occurred: liboctave/util/oct-inttypes.h
Error message:
./util/oct-inttypes.h: In instantiation of 'class octave_int<char>':
./util/oct-inttypes.h:1041:31: required from here
./util/oct-inttypes.h:834:3: error: 'octave_int<T>::octave_int(char) [with T =
char]' cannot be overloaded
octave_int (char c)
^
./util/oct-inttypes.h:831:3: error: with 'octave_int<T>::octave_int(T) [with T
= char]'
octave_int (T i) : ival (i) { }
^
Daniel Sebald's assumption
To me, that sounds like attempting to convert 8-bit integer
behavior to 16-bit integer so that the << operators output numbers.
Somehow this sort of trick (for lack of word) isn't compiling
correctly on SPARC.
Mike Muller
Yes I think so. Unfortunately this also needs someone with access
to a SPARC Solaris system with GNU tools to reproduce and provide a
fix. Notably we don't see this error when building Octave on a
SPARC with Debian GNU/Linux [1].
[1]
https://buildd.debian.org/status/logs.php?pkg=octave&ver=3.8.2-4&arch=sparc
Source of oct-inttypes.h of octave-3.8.2 is attached.
Short log ans short source on this matter
array/Array-b.cc:29
#include "Array.h"
array/Array.h:36
#include "idx-vector.h"
array/idx-vector.h:35
#include "oct-inttypes.h"
./util/oct-inttypes.h: In instantiation of 'class octave_int<char>':
./util/oct-inttypes.h:1041:31: required from here
./util/oct-inttypes.h:834:3: error: 'octave_int<T>::octave_int(char) [with T =
char]' cannot be overloaded octave_int (char c)
^
./util/oct-inttypes.h:1041
1037: template <>
1038: inline std::ostream&
1039: operator << (std::ostream& os, const octave_int<int8_t>& ival)
1040: {
1041: os << static_cast<int> (ival.value ());
1042: return os;
1043: }
./util/oct-inttypes.h:834
833: // Always treat characters as unsigned.
834: octave_int (char c)
835: : ival (octave_int_base<T>::truncate_int (static_cast<unsigned char>
(c)))
836: { }
./util/oct-inttypes.h:831:3: error: with 'octave_int<T>::octave_int(T) [with T
= char]'
octave_int (T i) : ival (i) { }
^
./util/oct-inttypes.h:831
831: octave_int (T i) : ival (i) { }
Full log for errors (and warnings)
In file included from array/idx-vector.h:35:0,
from array/Array.h:36,
from array/Array-b.cc:29:
./util/oct-inttypes.h: In instantiation of 'class octave_int<char>':
./util/oct-inttypes.h:1041:31: required from here
./util/oct-inttypes.h:834:3: error: 'octave_int<T>::octave_int(char) [with T =
char]' cannot be overloaded
octave_int (char c)
^
./util/oct-inttypes.h:831:3: error: with 'octave_int<T>::octave_int(T) [with T
= char]'
octave_int (T i) : ival (i) { }
^
In file included from array/idx-vector.h:37:0,
from array/Array.h:36,
from array/Array-b.cc:29:
./util/oct-mem.h: In function 'T* no_ctor_new(std::size_t) [with T =
std::complex<double>; std::size_t = unsigned int]':
./util/oct-mem.h:143:74: warning: cast from 'char*' to 'Complex* {aka
std::complex<double>*}' increases required alignment of target type
[-Wcast-align]
{ return reinterpret_cast<T *> (new char [safe_size_comp (n, sizeof (T))]); }
\ ^
./util/oct-mem.h:148:1: note: in expansion of macro 'DEFINE_POD_NEW_DELETE'
DEFINE_POD_NEW_DELETE (Complex)
^
./util/oct-mem.h: In function 'T* no_ctor_new(std::size_t) [with T =
std::complex<float>; std::size_t = unsigned int]':
./util/oct-mem.h:143:74: warning: cast from 'char*' to 'FloatComplex* {aka
std::complex<float>*}' increases required alignment of target type
[-Wcast-align]
{ return reinterpret_cast<T *> (new char [safe_size_comp (n, sizeof (T))]); }
\ ^
./util/oct-mem.h:149:1: note: in expansion of macro 'DEFINE_POD_NEW_DELETE'
DEFINE_POD_NEW_DELETE (FloatComplex)
^
./util/oct-mem.h: In function 'T* no_ctor_new(std::size_t) [with T =
octave_int<short int>; std::size_t = unsigned int]':
./util/oct-mem.h:143:74: warning: cast from 'char*' to 'octave_int16* {aka
octave_int<short int>*}' increases required alignment of target type
[-Wcast-align]
{ return reinterpret_cast<T *> (new char [safe_size_comp (n, sizeof (T))]); }
\ ^
./util/oct-mem.h:152:1: note: in expansion of macro 'DEFINE_POD_NEW_DELETE'
DEFINE_POD_NEW_DELETE (octave_int16)
^
./util/oct-mem.h: In function 'T* no_ctor_new(std::size_t) [with T =
octave_int<int>; std::size_t = unsigned int]':
./util/oct-mem.h:143:74: warning: cast from 'char*' to 'octave_int32* {aka
octave_int<int>*}' increases required alignment of target type [-Wcast-align]
{ return reinterpret_cast<T *> (new char [safe_size_comp (n, sizeof (T))]); }
\ ^
./util/oct-mem.h:153:1: note: in expansion of macro 'DEFINE_POD_NEW_DELETE'
DEFINE_POD_NEW_DELETE (octave_int32)
^
./util/oct-mem.h: In function 'T* no_ctor_new(std::size_t) [with T =
octave_int<long long int>; std::size_t = unsigned int]':
./util/oct-mem.h:143:74: warning: cast from 'char*' to 'octave_int64* {aka
octave_int<long long int>*}' increases required alignment of target type
[-Wcast-align]
{ return reinterpret_cast<T *> (new char [safe_size_comp (n, sizeof (T))]); }
\ ^
./util/oct-mem.h:154:1: note: in expansion of macro 'DEFINE_POD_NEW_DELETE'
DEFINE_POD_NEW_DELETE (octave_int64)
^
./util/oct-mem.h: In function 'T* no_ctor_new(std::size_t) [with T =
octave_int<short unsigned int>; std::size_t = unsigned int]':
./util/oct-mem.h:143:74: warning: cast from 'char*' to 'octave_uint16* {aka
octave_int<short unsigned int>*}' increases required alignment of target type
[-Wcast-align]
{ return reinterpret_cast<T *> (new char [safe_size_comp (n, sizeof (T))]); }
\ ^
./util/oct-mem.h:156:1: note: in expansion of macro 'DEFINE_POD_NEW_DELETE'
DEFINE_POD_NEW_DELETE (octave_uint16)
^
./util/oct-mem.h: In function 'T* no_ctor_new(std::size_t) [with T =
octave_int<unsigned int>; std::size_t = unsigned int]':
./util/oct-mem.h:143:74: warning: cast from 'char*' to 'octave_uint32* {aka
octave_int<unsigned int>*}' increases required alignment of target type
[-Wcast-align]
{ return reinterpret_cast<T *> (new char [safe_size_comp (n, sizeof (T))]); }
\ ^
./util/oct-mem.h:157:1: note: in expansion of macro 'DEFINE_POD_NEW_DELETE'
DEFINE_POD_NEW_DELETE (octave_uint32)
^
./util/oct-mem.h: In function 'T* no_ctor_new(std::size_t) [with T =
octave_int<long long unsigned int>; std::size_t = unsigned int]':
./util/oct-mem.h:143:74: warning: cast from 'char*' to 'octave_uint64* {aka
octave_int<long long unsigned int>*}' increases required alignment of target
type [-Wcast-align]
{ return reinterpret_cast<T *> (new char [safe_size_comp (n, sizeof (T))]); }
\ ^
./util/oct-mem.h:158:1: note: in expansion of macro 'DEFINE_POD_NEW_DELETE'
DEFINE_POD_NEW_DELETE (octave_uint64)
^
In file included from array/Array.cc:42:0,
from array/Array-b.cc:30:
./util/oct-locbuf.h: In member function 'octave_local_buffer<short unsigned
int>::operator short unsigned int*() const':
./util/oct-locbuf.h:120:51: warning: cast from 'char*' to 'short unsigned
int*' increases required alignment of target type [-Wcast-align]
return reinterpret_cast<TYPE *> (this->data ()); \
^
./util/oct-locbuf.h:126:1: note: in expansion of macro 'SPECIALIZE_POD_BUFFER'
SPECIALIZE_POD_BUFFER (unsigned short);
^
./util/oct-locbuf.h: In member function 'octave_local_buffer<short
int>::operator short int*() const':
./util/oct-locbuf.h:120:51: warning: cast from 'char*' to 'short int*'
increases required alignment of target type [-Wcast-align]
return reinterpret_cast<TYPE *> (this->data ()); \
^
./util/oct-locbuf.h:127:1: note: in expansion of macro 'SPECIALIZE_POD_BUFFER'
SPECIALIZE_POD_BUFFER (short);
^
./util/oct-locbuf.h: In member function 'octave_local_buffer<int>::operator
int*() const':
./util/oct-locbuf.h:120:51: warning: cast from 'char*' to 'int*' increases
required alignment of target type [-Wcast-align]
return reinterpret_cast<TYPE *> (this->data ()); \
^
./util/oct-locbuf.h:128:1: note: in expansion of macro 'SPECIALIZE_POD_BUFFER'
SPECIALIZE_POD_BUFFER (int);
^
./util/oct-locbuf.h: In member function 'octave_local_buffer<unsigned
int>::operator unsigned int*() const':
./util/oct-locbuf.h:120:51: warning: cast from 'char*' to 'unsigned int*'
increases required alignment of target type [-Wcast-align]
return reinterpret_cast<TYPE *> (this->data ()); \
^
./util/oct-locbuf.h:129:1: note: in expansion of macro 'SPECIALIZE_POD_BUFFER'
SPECIALIZE_POD_BUFFER (unsigned int);
^
./util/oct-locbuf.h: In member function 'octave_local_buffer<long
int>::operator long int*() const':
./util/oct-locbuf.h:120:51: warning: cast from 'char*' to 'long int*'
increases required alignment of target type [-Wcast-align]
return reinterpret_cast<TYPE *> (this->data ()); \
^
./util/oct-locbuf.h:130:1: note: in expansion of macro 'SPECIALIZE_POD_BUFFER'
SPECIALIZE_POD_BUFFER (long);
^
./util/oct-locbuf.h: In member function 'octave_local_buffer<long unsigned
int>::operator long unsigned int*() const':
./util/oct-locbuf.h:120:51: warning: cast from 'char*' to 'long unsigned int*'
increases required alignment of target type [-Wcast-align]
return reinterpret_cast<TYPE *> (this->data ()); \
^
./util/oct-locbuf.h:131:1: note: in expansion of macro 'SPECIALIZE_POD_BUFFER'
SPECIALIZE_POD_BUFFER (unsigned long);
^
./util/oct-locbuf.h: In member function 'octave_local_buffer<float>::operator
float*() const':
./util/oct-locbuf.h:120:51: warning: cast from 'char*' to 'float*' increases
required alignment of target type [-Wcast-align]
return reinterpret_cast<TYPE *> (this->data ()); \
^
./util/oct-locbuf.h:132:1: note: in expansion of macro 'SPECIALIZE_POD_BUFFER'
SPECIALIZE_POD_BUFFER (float);
^
./util/oct-locbuf.h: In member function 'octave_local_buffer<double>::operator
double*() const':
./util/oct-locbuf.h:120:51: warning: cast from 'char*' to 'double*' increases
required alignment of target type [-Wcast-align]
return reinterpret_cast<TYPE *> (this->data ()); \
^
./util/oct-locbuf.h:133:1: note: in expansion of macro 'SPECIALIZE_POD_BUFFER'
SPECIALIZE_POD_BUFFER (double);
^
./util/oct-locbuf.h: In member function
'octave_local_buffer<std::complex<double> >::operator Complex*() const':
./util/oct-locbuf.h:120:51: warning: cast from 'char*' to 'Complex* {aka
std::complex<double>*}' increases required alignment of target type
[-Wcast-align]
return reinterpret_cast<TYPE *> (this->data ()); \
^
./util/oct-locbuf.h:135:1: note: in expansion of macro 'SPECIALIZE_POD_BUFFER'
SPECIALIZE_POD_BUFFER (Complex);
^
./util/oct-locbuf.h: In member function
'octave_local_buffer<std::complex<float> >::operator FloatComplex*() const':
./util/oct-locbuf.h:120:51: warning: cast from 'char*' to 'FloatComplex* {aka
std::complex<float>*}' increases required alignment of target type
[-Wcast-align]
return reinterpret_cast<TYPE *> (this->data ()); \
^
./util/oct-locbuf.h:136:1: note: in expansion of macro 'SPECIALIZE_POD_BUFFER'
SPECIALIZE_POD_BUFFER (FloatComplex);
^
Makefile:5264: recipe for target 'array/array_libarray_la-Array-b.lo' failed
gmake[4]: *** [array/array_libarray_la-Array-b.lo] Error 1
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: 2015年06月26日 02時53分02秒 Name: oct-inttypes.h Size: 34kB
By: tmacchant
<http://savannah.gnu.org/bugs/download.php?file_id=34321>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?45411>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #45411] cast fail at liboctave/util/oct-inttypes.h on Sparc Solaris,
Tatsuro MATSUOKA <=