c++: fix error reporting routines re-entered ICE [PR110175]
commit4de22e25918f6fe40184c444ba6d81b19b806e26
authorMarek Polacek <polacek@redhat.com>
Thu, 8 Jun 2023 18:07:44 +0000 (8 14:07 -0400)
committerMarek Polacek <polacek@redhat.com>
Wed, 28 Jun 2023 15:51:59 +0000 (28 11:51 -0400)
treecfa76a564a63d93bc1952479cce2adfeeb1afeb2
parent8719ab0d01d5a73767e34f88691c812db03e1449
c++: fix error reporting routines re-entered ICE [PR110175]

Here we get the "error reporting routines re-entered" ICE because
of an unguarded use of warning_at.  While at it, I added a check
for a warning_at just above it.

PR c++/110175

gcc/cp/ChangeLog:

* typeck.cc (cp_build_unary_op): Check tf_warning before warning.

gcc/testsuite/ChangeLog:

* g++.dg/cpp0x/decltype-110175.C: New test.
gcc/cp/typeck.cc
gcc/testsuite/g++.dg/cpp0x/decltype-110175.C [new file with mode: 0644]