URL:
<https://savannah.gnu.org/bugs/?57515>
Summary: node.cpp: Warning caused by "-Wdeprecated-copy"
Project: GNU troff
Submitted by: bjarniig
Submitted on: Thu 02 Jan 2020 01:09:50 AM UTC
Category: Core
Severity: 3 - Normal
Item Group: Build/Installation
Status: None
Privacy: Public
Assigned to: None
Open/Closed: Open
Discussion Lock: Any
Planned Release: None
_______________________________________________________
Details:
Subject: node.cpp: Warning caused by "-Wdeprecated-copy"
The "-Wdeprecated-copy" (gcc version >= 9) is included in the
"-Wextra".
Configuration of "groff" with:
CC='/usr/bin/gcc' # (Debian 9.2.1-21) 9.2.1 20191130
CFLAGS="\
-Wall -Wextra -Wformat=2 -Wmissing-prototypes \
-Wold-style-definition -Wstrict-prototypes -Wstringop-overflow=4 \
-Wold-style-declaration -Wshadow=global \
-fstack-protector-strong -fno-common -funsigned-char \
-fvar-tracking-assignments \
-fstack-clash-protection \
-ftrapv \
-std=c11 -pedantic -D_FORTIFY_SOURCE=2 \
"
CXXFLAGS="\
-Wall -Wextra -Wformat=2 \
-fstack-protector-strong -fno-common -funsigned-char \
-std=c++14 \
"
LDFLAGS="-fsanitize=undefined" # -fsanitize=address"
make ...: Warnings:
[...]
CXX src/roff/troff/node.o
../src/roff/troff/node.cpp: In copy constructor 'tfont_spec::tfont_spec(const
tfont_spec&)':
../src/roff/troff/node.cpp:181:48: warning: implicitly-declared 'constexpr
tfont_spec& tfont_spec::operator=(const tfont_spec&)' is deprecated
[-Wdeprecated-copy]
181 | tfont_spec(const tfont_spec &spec) { *this = spec; }
| ^~~~
../src/roff/troff/node.cpp:181:3: note: because 'tfont_spec' has user-provided
'tfont_spec::tfont_spec(const tfont_spec&)'
181 | tfont_spec(const tfont_spec &spec) { *this = spec; }
| ^~~~~~~~~~
[...]
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?57515>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/