OK.
On Wed, Mar 28, 2018 at 8:25 AM, Paolo Carlini <paolo.carl...@oracle.com> wrote: > Hi, > > as I said in the audit trail, in its way this error recovery issue is > somewhat interesting: Jason's r251422 added some code at the beginning of > tsubst_default_argument, included the gcc_assert that triggers here. In > fact, parmtype is only used in the assertion thus the error recovery check > could be moved inside the assertion, something like (appears to also pass > testing, lightly tested, so far): > > gcc_assert (parmtype == error_mark_node || > same_type_ignoring_top_level_qualifiers_p (type, parmtype)); > > and for this bug we would be back to the gcc-7 status, thus we would not ICE > and we would issue *2* errors, one for the parameter and then one more for > the default argument itself, at instantiation time. In fact, some other > compilers also do that. Or, as I have below, we can return early, after the > first error. Tested x86_64-linux. > > Thanks, Paolo. > > /////////////////// >