public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/110612] New: text-art: four clang warnings
@ 2023-07-10 14:24 dcb314 at hotmail dot com
  2023-07-20  9:28 ` [Bug middle-end/110612] " dcb314 at hotmail dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: dcb314 at hotmail dot com @ 2023-07-10 14:24 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110612

            Bug ID: 110612
           Summary: text-art: four clang warnings
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c
          Assignee: unassigned at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

For the text-art directory, here is the list of warnings produced
by a build of gcc trunk by clang:

../../trunk.year/gcc/text-art/table.cc:561:15: warning: comparison of integers
of different signs: 'int' and 'size_type' (aka 'unsigned long')
[-Wsign-compare]
../../trunk.year/gcc/text-art/table.cc:573:15: warning: comparison of integers
of different signs: 'int' and 'size_type' (aka 'unsigned long')
[-Wsign-compare]
../../trunk.year/gcc/text-art/table.h:235:16: warning: private field 'm_table'
is not used [-Wunused-private-field]
../../trunk.year/gcc/text-art/widget.h:151:8: warning:
'update_child_alloc_rects' overrides a member function but is not marked
'override' [-Winconsistent-missing-override]

These might be worth fixing.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug middle-end/110612] text-art: four clang warnings
  2023-07-10 14:24 [Bug c/110612] New: text-art: four clang warnings dcb314 at hotmail dot com
@ 2023-07-20  9:28 ` dcb314 at hotmail dot com
  2023-07-21  0:29 ` cvs-commit at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: dcb314 at hotmail dot com @ 2023-07-20  9:28 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110612

--- Comment #1 from David Binderman <dcb314 at hotmail dot com> ---
A couple more clang warnings related to the text-art directory:

/usr/bin/../lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/unique_ptr.h:99:2:
warning: delete called on non-final 'ana::string_region_spatial_item' that has
virtual functions but non-virtual destructor
[-Wdelete-non-abstract-non-virtual-dtor]
/usr/bin/../lib/gcc/x86_64-redhat-linux/13/../../../../include/c++/13/bits/unique_ptr.h:99:2:
warning: delete called on non-final 'ana::svalue_spatial_item' that has virtual
functions but non-virtual destructor [-Wdelete-non-abstract-non-virtual-dtor]

$ grep -F string_region_spatial_item */*.cc
analyzer/access-diagram.cc:   01| ALIGNED CHILD WIDGET (lines 01-07):
(string_region_spatial_item)-+-----+
analyzer/access-diagram.cc:class string_region_spatial_item : public
svalue_spatial_item
analyzer/access-diagram.cc:  string_region_spatial_item (const access_operation
&op,
analyzer/access-diagram.cc:      return make_unique
<string_region_spatial_item> (op, sval, actual_bits,
$

$ grep -n virtual analyzer/access-diagram.cc
1128:  virtual void add_boundaries (boundaries &out, logger *) const = 0;
1130:  virtual table make_table (const bit_to_table_map &btm,
gcc $

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug middle-end/110612] text-art: four clang warnings
  2023-07-10 14:24 [Bug c/110612] New: text-art: four clang warnings dcb314 at hotmail dot com
  2023-07-20  9:28 ` [Bug middle-end/110612] " dcb314 at hotmail dot com
@ 2023-07-21  0:29 ` cvs-commit at gcc dot gnu.org
  2023-07-21  0:39 ` dmalcolm at gcc dot gnu.org
  2023-07-21  7:13 ` dcb314 at hotmail dot com
  3 siblings, 0 replies; 5+ messages in thread
From: cvs-commit at gcc dot gnu.org @ 2023-07-21  0:29 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110612

--- Comment #2 from CVS Commits <cvs-commit at gcc dot gnu.org> ---
The master branch has been updated by David Malcolm <dmalcolm@gcc.gnu.org>:

https://gcc.gnu.org/g:7006f02bbc3f1d0b7ed7fe2122abc0896aa848d2

commit r14-2689-g7006f02bbc3f1d0b7ed7fe2122abc0896aa848d2
Author: David Malcolm <dmalcolm@redhat.com>
Date:   Thu Jul 20 20:24:06 2023 -0400

    analyzer/text-art: fix clang warnings [PR110433,PR110612]

    gcc/analyzer/ChangeLog:
            PR analyzer/110433
            PR middle-end/110612
            * access-diagram.cc (class spatial_item): Add virtual dtor.

    gcc/ChangeLog:
            PR middle-end/110612
            * text-art/table.cc (table_geometry::table_geometry): Drop m_table
            field.
            (table_geometry::table_x_to_canvas_x): Add cast to comparison.
            (table_geometry::table_y_to_canvas_y): Likewise.
            * text-art/table.h (table_geometry::m_table): Drop unused field.
            * text-art/widget.h (wrapper_widget::update_child_alloc_rects):
            Add "override".

    Signed-off-by: David Malcolm <dmalcolm@redhat.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug middle-end/110612] text-art: four clang warnings
  2023-07-10 14:24 [Bug c/110612] New: text-art: four clang warnings dcb314 at hotmail dot com
  2023-07-20  9:28 ` [Bug middle-end/110612] " dcb314 at hotmail dot com
  2023-07-21  0:29 ` cvs-commit at gcc dot gnu.org
@ 2023-07-21  0:39 ` dmalcolm at gcc dot gnu.org
  2023-07-21  7:13 ` dcb314 at hotmail dot com
  3 siblings, 0 replies; 5+ messages in thread
From: dmalcolm at gcc dot gnu.org @ 2023-07-21  0:39 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110612

David Malcolm <dmalcolm at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |FIXED

--- Comment #3 from David Malcolm <dmalcolm at gcc dot gnu.org> ---
Thanks for filing this.

I believe all of these should be fixed by the above commit; please let me know
if any such warnings remain.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug middle-end/110612] text-art: four clang warnings
  2023-07-10 14:24 [Bug c/110612] New: text-art: four clang warnings dcb314 at hotmail dot com
                   ` (2 preceding siblings ...)
  2023-07-21  0:39 ` dmalcolm at gcc dot gnu.org
@ 2023-07-21  7:13 ` dcb314 at hotmail dot com
  3 siblings, 0 replies; 5+ messages in thread
From: dcb314 at hotmail dot com @ 2023-07-21  7:13 UTC (permalink / raw)
  To: gcc-bugs

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110612

--- Comment #4 from David Binderman <dcb314 at hotmail dot com> ---
(In reply to David Malcolm from comment #3)
> Thanks for filing this.

You are welcome.

> I believe all of these should be fixed by the above commit; please let me
> know if any such warnings remain.

I don't think this one has been mentioned already:

gcc/analyzer/access-diagram.cc:944:26: warning: private field 'm_col_widths' is
not used [-Wunused-private-field]

$ grep m_col_widths access-diagram.cc
    m_col_widths (col_widths),
    m_cell_sizes (m_col_widths, m_row_heights),
  table_dimension_sizes &m_col_widths; // Reference to shared column widths
    m_col_widths (col_widths)
  table_dimension_sizes &m_col_widths;
    m_col_widths
    for (auto w : m_col_widths->m_requirements)
      = new x_aligned_table_widget (std::move (t), m_theme, *m_col_widths);
      = new x_aligned_x_ruler_widget (*this, m_theme, *m_col_widths);
        int canvas_w = m_col_widths->m_requirements[table_x];
            = (m_col_widths->m_requirements[table_x] * fixed_point) / bit_size;
    m_col_widths->m_requirements[min_idx] += 1;
  std::unique_ptr<table_dimension_sizes> m_col_widths;
$

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-07-21  7:13 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-07-10 14:24 [Bug c/110612] New: text-art: four clang warnings dcb314 at hotmail dot com
2023-07-20  9:28 ` [Bug middle-end/110612] " dcb314 at hotmail dot com
2023-07-21  0:29 ` cvs-commit at gcc dot gnu.org
2023-07-21  0:39 ` dmalcolm at gcc dot gnu.org
2023-07-21  7:13 ` dcb314 at hotmail dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).