bugGNU roff - Bugs: bug #57515, [troff]...

 
 

bug #57515: [troff] "-Wdeprecated-copy" warning in node.cpp

Submitter:  Bjarni Ingi Gislason <bjarniig>
Submitted:  Thu 02 Jan 2020 01:09:50 AM UTC
   
 
Category:  Core Severity:  2 - Minor
Item Group:  Lint Status:  Fixed
Privacy:  Public Assigned to:  gbranden
Open/Closed:  Closed Planned Release:  1.24.0
* Mandatory Fields

Add a New Comment Rich Markup
   

Wed 23 Aug 2023 09:04:25 AM UTC, comment #1: 

Pushed a few days ago.


commit bd74004a19a0740248332c01789642842e77698f
Author: G. Branden Robinson <g.branden.robinson@gmail.com>
Date:   Sat Aug 19 03:25:07 2023 -0500

    [troff]: Drop unnecessary copy constructor decl.

    * src/roff/troff/node.cpp (class tfont_spec): Stop declaring copy
      constructor.  The implicitly defined one suffices.  Resolves
      "-Wdeprecated-copy" warning from GCC.

    Fixes <https://savannah.gnu.org/bugs/?57515>.  Thanks to Bjarni Ingi
    Gislason for the report.


G. Branden Robinson <gbranden>
Group administrator
Thu 02 Jan 2020 01:09:50 AM UTC, original submission:  



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; }
      |   ^~~~~~~~~~
[...]


Bjarni Ingi Gislason <bjarniig>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by gbranden (Updated the item)
  • -email is unavailable- added by bjarniig (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-02-02 gbranden Severity3 - Normal 2 - Minor
        Item GroupBuild/Installation Lint
    2023-08-23 gbranden StatusIn Progress Fixed
        Open/ClosedOpen Closed
        Planned ReleaseNone 1.24.0
    2023-08-19 gbranden StatusNone In Progress
        Assigned toNone gbranden
        Summarynode.cpp: Warning caused by &quot;-Wdeprecated-copy&quot; [troff] "-Wdeprecated-copy" warning in node.cpp

    Back to the top

    Powered by Savane 3.13-758e.
    Corresponding source code