[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bug-apl] A few problems
From: |
vvs |
Subject: |
Re: [Bug-apl] A few problems |
Date: |
Sat, 2 Feb 2019 22:01:22 +0200 |
On Sat, Feb 2, 2019 at 9:08 PM Dr. Jürgen Sauermann
<address@hidden> wrote:
> thanks for reporting this. Could you please give an example for the gcc
> warnings> I am using
> g++ 4 .8.4 and I am not getting the warnings.
Of course. Here:
g++ -DHAVE_CONFIG_H -I. -I.. -Wall -I sql -Wold-style-cast -Werror
-I/usr/include -rdynamic -g -O2 -MT apl-main.o -MD -MP -MF
.deps/apl-main.Tpo -c -o apl-main.o `test -f 'main.cc' || echo
'./'`main.cc
In file included from UTF8_string.hh:28,
from LibPaths.hh:24,
from Command.hh:27,
from main.cc:34:
Simple_string.hh: In instantiation of ‘void Simple_string<T,
has_destructor>::pop() [with T = Shape; bool has_destructor = false]’:
Quad_CR.hh:139:27: required from here
Simple_string.hh:170:20: error: ‘void* memset(void*, int, size_t)’
clearing an object of non-trivial type ‘class Shape’; use assignment
or value-initialization instead [-Werror=class-memaccess]
memset(items + items_valid, 0, sizeof(T));
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from PrintBuffer.hh:28,
from Cell.hh:30,
from CharCell.hh:24,
from Value.hh:24,
from Command.hh:28,
from main.cc:34:
Shape.hh:31:7: note: ‘class Shape’ declared here
class Shape
^~~~~
In file included from UTF8_string.hh:28,
from LibPaths.hh:24,
from Command.hh:27,
from main.cc:34:
Simple_string.hh: In instantiation of ‘void Simple_string<T,
has_destructor>::pop() [with T = SvoPid; bool has_destructor =
false]’:
Simple_string.hh:178:70: required from ‘void Simple_string<T,
has_destructor>::shrink(ShapeItem) [with T = SvoPid; bool
has_destructor = false; ShapeItem = long long int]’
ProcessorID.hh:100:26: required from here
Simple_string.hh:170:20: error: ‘void* memset(void*, int, size_t)’
clearing an object of type ‘struct SvoPid’ with no trivial
copy-assignment; use assignment or value-initialization instead
[-Werror=class-memaccess]
memset(items + items_valid, 0, sizeof(T));
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from Svar_DB.hh:30,
from Symbol.hh:30,
from UserFunction.hh:29,
from Macro.hh:24,
from main.cc:38:
ProcessorID.hh:65:8: note: ‘struct SvoPid’ declared here
struct SvoPid
^~~~~~
In file included from UTF8_string.hh:28,
from LibPaths.hh:24,
from Command.hh:27,
from main.cc:34:
Simple_string.hh: In instantiation of ‘void Simple_string<T,
has_destructor>::pop() [with T = ProcAuth; bool has_destructor =
false]’:
Simple_string.hh:178:70: required from ‘void Simple_string<T,
has_destructor>::shrink(ShapeItem) [with T = ProcAuth; bool
has_destructor = false; ShapeItem = long long int]’
ProcessorID.hh:101:28: required from here
Simple_string.hh:170:20: error: ‘void* memset(void*, int, size_t)’
clearing an object of type ‘struct ProcAuth’ with no trivial
copy-assignment; use assignment or value-initialization instead
[-Werror=class-memaccess]
memset(items + items_valid, 0, sizeof(T));
~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from Svar_DB.hh:30,
from Symbol.hh:30,
from UserFunction.hh:29,
from Macro.hh:24,
from main.cc:38:
ProcessorID.hh:76:8: note: ‘struct ProcAuth’ declared here
struct ProcAuth
^~~~~~~~
cc1plus: all warnings being treated as errors
- [Bug-apl] A few problems, vvs, 2019/02/02
- Re: [Bug-apl] A few problems, Dr . Jürgen Sauermann, 2019/02/02
- Re: [Bug-apl] A few problems,
vvs <=
- Re: [Bug-apl] A few problems, Dr . Jürgen Sauermann, 2019/02/03
- Re: [Bug-apl] A few problems, vvs, 2019/02/03
- Re: [Bug-apl] A few problems, Dr . Jürgen Sauermann, 2019/02/03
- Re: [Bug-apl] A few problems, vvs, 2019/02/03
- Re: [Bug-apl] A few problems, Dr . Jürgen Sauermann, 2019/02/04
- Re: [Bug-apl] A few problems, vvs, 2019/02/04
- Re: [Bug-apl] A few problems, Dr . Jürgen Sauermann, 2019/02/05
- Re: [Bug-apl] A few problems, vvs, 2019/02/05
- Re: [Bug-apl] A few problems, Dr . Jürgen Sauermann, 2019/02/06
- Re: [Bug-apl] A few problems, vvs, 2019/02/06