On 3/4/21 5:51 AM, Richard Biener wrote:
> The gcc.dg/noncompile/pr79758.c testcase prints
>
> pr79758.c:5:6: error: redefinition of 'fn1'
> 'error_mark' not supported by
> direct_abstract_declarator)'/home/rguenther/src/gcc3/gcc/testsuite/gcc.dg/noncompile/pr79758.c:4:6:
> note: previous definition of 'fn1' with type
>
> which shows a) re-entry of pp_printf via pp_unsupported_tree and b) a
> bogus diagnostic. The following handles ERROR_MARK in
> direct_abstract_declarator, yielding in the better
>
> /home/rguenther/src/gcc3/gcc/testsuite/gcc.dg/noncompile/pr79758.c:5:6:
> error: redefinition of 'fn1'
> /home/rguenther/src/gcc3/gcc/testsuite/gcc.dg/noncompile/pr79758.c:4:6: note:
> previous definition of 'fn1' with type 'void(<type-error>)'
>
> but still maybe not perfect.
>
> Bootstrapped on x86_64-unknown-linux-gnu, testing in progress.
>
> OK for trunk? GCC 10 doesn't exhibit this issue since it doesn't
> print the 'with type ...' part.
>
> 2021-03-04 Richard Biener <rguent...@suse.de>
>
> gcc/c-family/
> * c-pretty-print.c (c_pretty_printer::direct_abstract_declarator):
> Handle ERROR_MARK.
OK
jeff