[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #53544] -Wclass-memaccess warnings
From: |
Dmitri A. Sergatskov |
Subject: |
[Octave-bug-tracker] [bug #53544] -Wclass-memaccess warnings |
Date: |
Sun, 1 Apr 2018 14:38:50 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Fedora; Linux x86_64; rv:59.0) Gecko/20100101 Firefox/59.0 |
URL:
<http://savannah.gnu.org/bugs/?53544>
Summary: -Wclass-memaccess warnings
Project: GNU Octave
Submitted by: dasergatskov
Submitted on: Sun 01 Apr 2018 06:38:49 PM UTC
Category: Interpreter
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Missed Error or Warning
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: GNU/Linux
_______________________________________________________
Details:
With gcc 8.0.1 I see those (53440f9bffba (stable) tip):
../libinterp/corefcn/typecast.cc: In instantiation of ‘ArrayType
reinterpret_copy(const void*, octave_idx_type, const dim_vector&) [with
ArrayType = intNDArray<octave_int<signed char> >; octave_idx_type = long
int]’:
../libinterp/corefcn/typecast.cc:221:74: required from here
../libinterp/corefcn/typecast.cc:80:15: warning: ‘void* memcpy(void*, const
void*, size_t)’ writing to an object of type ‘T’ {aka ‘class
octave_int<signed char>’} with no trivial copy-assignment; use
copy-assignment or copy-initialization instead [-Wclass-memaccess]
std::memcpy (dest, data, n * sizeof (T));
~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../liboctave/operators/mx-inlines.cc:40,
from ../liboctave/array/MArray.h:30,
from ../liboctave/array/MSparse.h:30,
from ../liboctave/array/MatrixType.h:29,
from ../liboctave/operators/mx-base.h:30,
from ../libinterp/corefcn/typecast.cc:30:
../liboctave/util/oct-inttypes.h:847:1: note: ‘T’ {aka ‘class
octave_int<signed char>’} declared here
octave_int : public octave_int_base<T>
^~~~~~~~~~
../libinterp/corefcn/typecast.cc: In instantiation of ‘ArrayType
reinterpret_copy(const void*, octave_idx_type, const dim_vector&) [with
ArrayType = intNDArray<octave_int<short int> >; octave_idx_type = long
int]’:
../libinterp/corefcn/typecast.cc:223:75: required from here
../libinterp/corefcn/typecast.cc:80:15: warning: ‘void* memcpy(void*, const
void*, size_t)’ writing to an object of type ‘T’ {aka ‘class
octave_int<short int>’} with no trivial copy-assignment; use copy-assignment
or copy-initialization instead [-Wclass-memaccess]
std::memcpy (dest, data, n * sizeof (T));
~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../liboctave/operators/mx-inlines.cc:40,
from ../liboctave/array/MArray.h:30,
from ../liboctave/array/MSparse.h:30,
from ../liboctave/array/MatrixType.h:29,
from ../liboctave/operators/mx-base.h:30,
from ../libinterp/corefcn/typecast.cc:30:
../liboctave/util/oct-inttypes.h:847:1: note: ‘T’ {aka ‘class
octave_int<short int>’} declared here
octave_int : public octave_int_base<T>
^~~~~~~~~~
../libinterp/corefcn/typecast.cc: In instantiation of ‘ArrayType
reinterpret_copy(const void*, octave_idx_type, const dim_vector&) [with
ArrayType = intNDArray<octave_int<int> >; octave_idx_type = long int]’:
../libinterp/corefcn/typecast.cc:225:75: required from here
../libinterp/corefcn/typecast.cc:80:15: warning: ‘void* memcpy(void*, const
void*, size_t)’ writing to an object of type ‘T’ {aka ‘class
octave_int<int>’} with no trivial copy-assignment; use copy-assignment or
copy-initialization instead [-Wclass-memaccess]
std::memcpy (dest, data, n * sizeof (T));
~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../liboctave/operators/mx-inlines.cc:40,
from ../liboctave/array/MArray.h:30,
from ../liboctave/array/MSparse.h:30,
from ../liboctave/array/MatrixType.h:29,
from ../liboctave/operators/mx-base.h:30,
from ../libinterp/corefcn/typecast.cc:30:
../liboctave/util/oct-inttypes.h:847:1: note: ‘T’ {aka ‘class
octave_int<int>’} declared here
octave_int : public octave_int_base<T>
^~~~~~~~~~
../libinterp/corefcn/typecast.cc: In instantiation of ‘ArrayType
reinterpret_copy(const void*, octave_idx_type, const dim_vector&) [with
ArrayType = intNDArray<octave_int<long int> >; octave_idx_type = long
int]’:
../libinterp/corefcn/typecast.cc:227:75: required from here
../libinterp/corefcn/typecast.cc:80:15: warning: ‘void* memcpy(void*, const
void*, size_t)’ writing to an object of type ‘T’ {aka ‘class
octave_int<long int>’} with no trivial copy-assignment; use copy-assignment
or copy-initialization instead [-Wclass-memaccess]
std::memcpy (dest, data, n * sizeof (T));
~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../liboctave/operators/mx-inlines.cc:40,
from ../liboctave/array/MArray.h:30,
from ../liboctave/array/MSparse.h:30,
from ../liboctave/array/MatrixType.h:29,
from ../liboctave/operators/mx-base.h:30,
from ../libinterp/corefcn/typecast.cc:30:
../liboctave/util/oct-inttypes.h:847:1: note: ‘T’ {aka ‘class
octave_int<long int>’} declared here
octave_int : public octave_int_base<T>
^~~~~~~~~~
../libinterp/corefcn/typecast.cc: In instantiation of ‘ArrayType
reinterpret_copy(const void*, octave_idx_type, const dim_vector&) [with
ArrayType = intNDArray<octave_int<unsigned char> >; octave_idx_type = long
int]’:
../libinterp/corefcn/typecast.cc:232:75: required from here
../libinterp/corefcn/typecast.cc:80:15: warning: ‘void* memcpy(void*, const
void*, size_t)’ writing to an object of type ‘T’ {aka ‘class
octave_int<unsigned char>’} with no trivial copy-assignment; use
copy-assignment or copy-initialization instead [-Wclass-memaccess]
std::memcpy (dest, data, n * sizeof (T));
~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../liboctave/operators/mx-inlines.cc:40,
from ../liboctave/array/MArray.h:30,
from ../liboctave/array/MSparse.h:30,
from ../liboctave/array/MatrixType.h:29,
from ../liboctave/operators/mx-base.h:30,
from ../libinterp/corefcn/typecast.cc:30:
../liboctave/util/oct-inttypes.h:847:1: note: ‘T’ {aka ‘class
octave_int<unsigned char>’} declared here
octave_int : public octave_int_base<T>
^~~~~~~~~~
../libinterp/corefcn/typecast.cc: In instantiation of ‘ArrayType
reinterpret_copy(const void*, octave_idx_type, const dim_vector&) [with
ArrayType = intNDArray<octave_int<short unsigned int> >; octave_idx_type =
long int]’:
../libinterp/corefcn/typecast.cc:235:59: required from here
../libinterp/corefcn/typecast.cc:80:15: warning: ‘void* memcpy(void*, const
void*, size_t)’ writing to an object of type ‘T’ {aka ‘class
octave_int<short unsigned int>’} with no trivial copy-assignment; use
copy-assignment or copy-initialization instead [-Wclass-memaccess]
std::memcpy (dest, data, n * sizeof (T));
~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../liboctave/operators/mx-inlines.cc:40,
from ../liboctave/array/MArray.h:30,
from ../liboctave/array/MSparse.h:30,
from ../liboctave/array/MatrixType.h:29,
from ../liboctave/operators/mx-base.h:30,
from ../libinterp/corefcn/typecast.cc:30:
../liboctave/util/oct-inttypes.h:847:1: note: ‘T’ {aka ‘class
octave_int<short unsigned int>’} declared here
octave_int : public octave_int_base<T>
^~~~~~~~~~
../libinterp/corefcn/typecast.cc: In instantiation of ‘ArrayType
reinterpret_copy(const void*, octave_idx_type, const dim_vector&) [with
ArrayType = intNDArray<octave_int<unsigned int> >; octave_idx_type = long
int]’:
../libinterp/corefcn/typecast.cc:238:59: required from here
../libinterp/corefcn/typecast.cc:80:15: warning: ‘void* memcpy(void*, const
void*, size_t)’ writing to an object of type ‘T’ {aka ‘class
octave_int<unsigned int>’} with no trivial copy-assignment; use
copy-assignment or copy-initialization instead [-Wclass-memaccess]
std::memcpy (dest, data, n * sizeof (T));
~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../liboctave/operators/mx-inlines.cc:40,
from ../liboctave/array/MArray.h:30,
from ../liboctave/array/MSparse.h:30,
from ../liboctave/array/MatrixType.h:29,
from ../liboctave/operators/mx-base.h:30,
from ../libinterp/corefcn/typecast.cc:30:
../liboctave/util/oct-inttypes.h:847:1: note: ‘T’ {aka ‘class
octave_int<unsigned int>’} declared here
octave_int : public octave_int_base<T>
^~~~~~~~~~
../libinterp/corefcn/typecast.cc: In instantiation of ‘ArrayType
reinterpret_copy(const void*, octave_idx_type, const dim_vector&) [with
ArrayType = intNDArray<octave_int<long unsigned int> >; octave_idx_type = long
int]’:
../libinterp/corefcn/typecast.cc:241:59: required from here
../libinterp/corefcn/typecast.cc:80:15: warning: ‘void* memcpy(void*, const
void*, size_t)’ writing to an object of type ‘T’ {aka ‘class
octave_int<long unsigned int>’} with no trivial copy-assignment; use
copy-assignment or copy-initialization instead [-Wclass-memaccess]
std::memcpy (dest, data, n * sizeof (T));
~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../liboctave/operators/mx-inlines.cc:40,
from ../liboctave/array/MArray.h:30,
from ../liboctave/array/MSparse.h:30,
from ../liboctave/array/MatrixType.h:29,
from ../liboctave/operators/mx-base.h:30,
from ../libinterp/corefcn/typecast.cc:30:
../liboctave/util/oct-inttypes.h:847:1: note: ‘T’ {aka ‘class
octave_int<long unsigned int>’} declared here
octave_int : public octave_int_base<T>
^~~~~~~~~~
Dmitri.
--
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?53544>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #53544] -Wclass-memaccess warnings,
Dmitri A. Sergatskov <=