On Fri, 2020-01-24 at 19:53 -0500, David Malcolm wrote: > This patch fixes various build failures seen with gcc 4.4 > > gcc prior to 4.6 complains about: > > error: #pragma GCC diagnostic not allowed inside functions > > for various uses of PUSH_IGNORE_WFORMAT and POP_IGNORE_WFORMAT. > This patch makes them a no-op with such compilers. > > The patch also fixes various errors with template base initializers > and redundant uses of "typename" that older g++ implementations > can't cope with. > > Successfully bootstrapped & regrtested on x86_64-pc-linux-gnu > with gcc gcc 9.2.1. > Appears to fix the build with gcc 4.4: I was able to successfully > build stage1 xgcc and cc1 and run the analyzer test suite (though > I'm seeing an apparently unrelated: > pure virtual method called > terminate called without an active exception > in the selftests for diagnostic-show-locus.c) > > OK for master? > > gcc/analyzer/ChangeLog: > PR analyzer/93276 > * analyzer.h (PUSH_IGNORE_WFORMAT, POP_IGNORE_WFORMAT): Guard these > macros with GCC_VERSION >= 4006, making them no-op otherwise. > * engine.cc (exploded_edge::exploded_edge): Specify template for > base class initializer. > (exploded_graph::add_edge): Specify template when chaining up to > base class add_edge implementation. > (viz_callgraph_node::dump_dot): Drop redundant "typename". > (viz_callgraph_edge::viz_callgraph_edge): Specify template for > base class initializer. > * program-state.cc (sm_state_map::clone_with_remapping): Drop > redundant "typename". > (sm_state_map::print): Likewise. > (sm_state_map::hash): Likewise. > (sm_state_map::operator==): Likewise. > (sm_state_map::remap_svalue_ids): Likewise. > (sm_state_map::on_svalue_purge): Likewise. > (sm_state_map::validate): Likewise. > * program-state.h (sm_state_map::iterator_t): Likewise. > * supergraph.h (superedge::superedge): Specify template for base > class initializer. > > gcc/ChangeLog: > PR analyzer/93276 > * digraph.cc (test_edge::test_edge): Specify template for base > class initializer. OK. And more generally, if you're hacking on facilities just used by the analyzer go ahead. While we haven't gone through the formal process of naming you maintainer of hte analyzer, I'm certain we will once I can come up for air and propose it.
jeff >