On Fri, Mar 10, 2017 at 9:58 AM, Paolo Carlini <paolo.carl...@oracle.com> wrote: > As such, the broken declaration cannot be rejected by the code we have in > finish_struct, something must happen earlier than that. It seems to me that > xref_tag_1 can be a good place, per the below patchlet, which passes testing > on x86_64-linux. I briefly wondered if making is_std_init_list stricter > would make sense instead, but I don't think so (consistently with the trail > of c++/60848 too): I believe that by the time we use is_std_init_list in the > internals we want something as simple as possible, we are assuming that > broken, fake, std::initializer_list aren't around in the translation unit. > In terms of details, I also wondered if CLASSTYPE_IS_TEMPLATE would make for > a better check, but seems unnecessarily more complex. Also, in principle, we > may want to have an even stricter check at declaration time (how many > template parameters, etc) but that seems overkilling and I don't think we > are risking ICEs because of that.
I agree with all of this. How about in pushtag_1 instead, where we can return error_mark_node instead of aborting? Jason