octave-maintainers
[Top][All Lists]
Advanced

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

Compile error at compiling liboctave/array/Array-b.cc due to "cannot be


From: Michele31415
Subject: Compile error at compiling liboctave/array/Array-b.cc due to "cannot be overloaded octave_int (char c)"
Date: Sun, 21 Jun 2015 21:59:39 -0700 (PDT)

This question was originally posted under a different title.  It has been
suggested that I post again under a new title that is (presumably) more
descriptive.  In any case, I still don't have the solution.  It seems like
I'm getting close to getting a Sparc version of Octave running as I finally
managed to get ./configure to complete.  Now if I could only get it to make.

---------------------------------------------------------

On a Sparc Solaris box building Octave 3.8.2 (update - v. 4.0.0 throws the
same error), gmake fails with:

 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&lt;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&lt;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


I looked around for something like this but was unable to find anything
similar.  I don't even understand what it's complaining about here.  Any
help would be greatly appreciated.  Thanks. 



--
View this message in context: 
http://octave.1599824.n4.nabble.com/Compile-error-at-compiling-liboctave-array-Array-b-cc-due-to-cannot-be-overloaded-octave-int-char-c-tp4671122.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.



reply via email to

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