bugGNU roff - Bugs: bug #65885, [troff] env.cpp: warning about...

 
 

bug #65885: [troff] env.cpp: warning about "-Woverloaded-virtual="

Submitter:  Bjarni Ingi Gislason <bjarniig>
Submitted:  Sat 15 Jun 2024 06:47:07 PM UTC
   
 
Category:  Core Severity:  2 - Minor
Item Group:  Build/Installation Status:  None
Privacy:  Public Assigned to:  None
Open/Closed:  Open Planned Release:  None
* Mandatory Fields

Post a Comment

Add a New Comment Rich Markup
   

Discussion

Wed 15 Oct 2025 12:08:06 AM UTC, comment #3: 

Bug #67604 was closed as a dup of this.  Over there, Branden wrote:

"Obviously the argument types given to these functions differ.  Which one is incorrect, or is one missing?

The whole point of the `unsigned_env_reg` class is to store an unsigned value, and `units` is basically a synonym of (signed) `int`.  I wonder if C/C++'s loose numeric typing is giving us grief here."

Dave <barx>
Group Member
Thu 08 Aug 2024 11:12:53 AM UTC, comment #2: 


comment #1:

> A compiler warning, particularly for a non-default warning type, is a "Lint" problem if there is no measurable defect in program behavior.


Changed my mind.  The foregoing justifies "Minor" severity, but the Item Group should conform to its documented meaning.

Setting "Item Group" to "Build/Installation": "A groff component provokes diagnostics from build or other external tools, or outright fails to deploy."

G. Branden Robinson <gbranden>
Group administrator
Sun 16 Jun 2024 11:44:23 AM UTC, comment #1: 

A compiler warning, particularly for a non-default warning type, is a "Lint" problem if there is no measurable defect in program behavior.

G. Branden Robinson <gbranden>
Group administrator
Sat 15 Jun 2024 06:47:07 PM UTC, original submission:  

Subject: env.cpp: warning about "-Woverloaded-virtual="

Directory: src/roff/troff

gcc-14 (Debian 14-20240330-1) 14.0.1 20240330 (experimental) [master r14-9728-g6fc84f680d0]

[...]
  CXX      src/roff/troff/env.o
In file included from ../src/roff/troff/env.cpp:29:
../src/roff/troff/reg.h:23:16: warning: 'virtual bool reg::get_value(units*)'
was hidden [-Woverloaded-virtual=]
   23 |   virtual bool get_value(units *);
      |                ^~~~~~~~~
../src/roff/troff/env.cpp:3184:8: note:   by 'bool
unsigned_env_reg::get_value(unsigned int*)'
 3184 |   bool get_value(unsigned *val);
      |        ^~~~~~~~~
  CXXLD    troff
[...]

Bjarni Ingi Gislason <bjarniig>

 

Attached Files

This item currently has no attached files.

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

Attach Files:
   
   
Comment:
   

 

Dependencies

This item does not depend on any other items.

No items depend on this one.

 

Mail Notification Carbon-Copy List

Carbon-Copy List
  • -email is unavailable- added by barx (Posted a comment)
  • -email is unavailable- added by gbranden (Posted a comment)
  • -email is unavailable- added by bjarniig (Submitted the item)
  •  

    Votes

    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.

     

    History

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2024-08-08 gbranden Summaryenv.cpp: warning about &quot;-Woverloaded-virtual=&quot; [troff] env.cpp: warning about "-Woverloaded-virtual="
    2024-08-08 gbranden Item GroupLint Build/Installation
    2024-06-16 gbranden Severity3 - Normal 2 - Minor
        Item GroupWarning/Suspicious behaviour Lint

    Back to the top

    Powered by Savane 3.16-27d0.
    Corresponding source code