On Mon, 29 May 2017, Jakub Jelinek wrote: > What if there is another ICE during the dumping? Won't we then > end in endless recursion? Perhaps global_dc->internal_error should > be cleared here first?
Hm, no, as far as I can see existing diagnostic machinery is supposed to fully handle that. It detects recursion; see e.g. diagnostic.c: error_recursion. > Also, as none of the arguments are used and we are in C++, > perhaps it should be > static void > internal_error_function (diagnostic_context *, const char *, va_list *) > { > ? Ah, it seems GCC tends to use either the long-winded form I've copy-pasted in my patch, or the slightly shorter variant with 'type_name ARG_UNUSED (arg_name)'. The shorthand form you're pointing out seems to be used only once, in vmsdbgout.c, as far as I can tell. I'll be happy to change my patch as desired by the reviewer, of course :) Alexander