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

            Bug ID: 125494
           Summary: clang & cppcheck over latest analyzer source code
           Product: gcc
           Version: 16.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: analyzer
          Assignee: dmalcolm at gcc dot gnu.org
          Reporter: dcb314 at hotmail dot com
  Target Milestone: ---

I compiled the analyzer with clang. It said:

../../trunk/gcc/analyzer/diagnostic-manager.cc:1902:25: warning: comparison of
integers of different signs: 'int' and 'size_type' (aka 'unsigned long')
[-Wsign-compare]
../../trunk/gcc/analyzer/engine.cc:1788:8: warning: unused variable 'logger'
[-Wunused-variable]
../../trunk/gcc/analyzer/engine.cc:1796:8: warning: unused variable 'fn_result'
[-Wunused-variable]

and

../../trunk/gcc/analyzer/region-model.cc:941:3: warning:
'mark_interesting_stuff' overrides a member function but is not marked
'override' [-Winconsistent-missing-override]
../../trunk/gcc/analyzer/region-model.cc:947:3: warning:
'add_function_entry_event' overrides a member function but is not marked
'override' [-Winconsistent-missing-override]
../../trunk/gcc/analyzer/shift-diagnostics.cc:144:3: warning:
'mark_interesting_stuff' overrides a member function but is not marked
'override' [-Winconsistent-missing-override]
../../trunk/gcc/analyzer/shift-diagnostics.cc:75:3: warning:
'mark_interesting_stuff' overrides a member function but is not marked
'override' [-Winconsistent-missing-override]

I also ran the static analyzer cppcheck over the same code. 
It said:

trunk/gcc/analyzer/infinite-recursion.cc:159:2: error: Non-local variable
'm_prev_entry_event' will use pointer to local variable 'prev_entry_event'.
[danglingLifetime]

which might be worth fixing. This further set might also be
worth fixing, but cppcheck marks them as warnings, not errors:

trunk/gcc/analyzer/access-diagram.cc:1156:12: warning: Member variable
'bit_to_t
able_map::m_num_columns' has no initializer. [uninitMemberVarNoCtor]
trunk/gcc/analyzer/supergraph-fixup-locations.cc:92:5: warning: Member variable 
'stats::m_num_iterations' is not initialized in the constructor.
[uninitMemberVa
r]
trunk/gcc/analyzer/supergraph-fixup-locations.cc:92:5: warning: Member variable 
'stats::m_num_copies' is not initialized in the constructor. [uninitMemberVar]
trunk/gcc/analyzer/supergraph-simplify.cc:235:5: warning: Member variable
'stats
::m_num_iterations' is not initialized in the constructor. [uninitMemberVar]
trunk/gcc/analyzer/supergraph-simplify.cc:235:5: warning: Member variable
'stats
::m_num_remove_node' is not initialized in the constructor. [uninitMemberVar]
trunk/gcc/analyzer/supergraph-simplify.cc:235:5: warning: Member variable
'stats
::m_num_remove_edge' is not initialized in the constructor. [uninitMemberVar]
trunk/gcc/analyzer/supergraph-simplify.cc:235:5: warning: Member variable
'stats
::m_num_set_edge_dest' is not initialized in the constructor. [uninitMemberVar]

There were many style issues reported, but not of them looked
to be worth fixing.

Reply via email to