On 7/22/2021 5:15 PM, Sergei Trofimovich via Gcc-patches wrote:
From: Sergei Trofimovich <siarh...@google.com>
r12-1804 ("cp: add support for per-location warning groups.") among other
things removed warning suppression from a few places including ptrmemfuncs.
Currently ptrmemfuncs don't have valid BINFO attached which causes ICEs
in access checks:
crash_signal
gcc/toplev.c:328
perform_or_defer_access_check(tree_node*, tree_node*, tree_node*, int,
access_failure_info*)
gcc/cp/semantics.c:490
finish_non_static_data_member(tree_node*, tree_node*, tree_node*)
gcc/cp/semantics.c:2208
...
The change suppresses warnings again until we provide BINFOs for ptrmemfuncs.
PR c++/101219
gcc/cp/ChangeLog:
* typeck.c (build_ptrmemfunc_access_expr): Suppress all warnings
to avoid ICE.
gcc/testsuite/ChangeLog:
* g++.dg/torture/pr101219.C: New test.
The C++ maintainers have the final say here, but ISTM that warning
suppression shouldn't be used to avoid an ICE, even an ICE within the
warning or diagnostic code itself.
jeff