[C++ Patch/RFC] PR 77752
Mon Mar 20 21:10:00 GMT 2017
On Fri, Mar 10, 2017 at 5:38 PM, Paolo Carlini <firstname.lastname@example.org> wrote:
> On 10/03/2017 16:57, Jason Merrill wrote:
>> On Fri, Mar 10, 2017 at 9:58 AM, Paolo Carlini <email@example.com>
>>> 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
>>> xref_tag_1 can be a good place, per the below patchlet, which passes
>>> 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
>>> of c++/60848 too): I believe that by the time we use is_std_init_list in
>>> internals we want something as simple as possible, we are assuming that
>>> broken, fake, std::initializer_list aren't around in the translation
>>> In terms of details, I also wondered if CLASSTYPE_IS_TEMPLATE would make
>>> a better check, but seems unnecessarily more complex. Also, in principle,
>>> 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?
> Sure. In that case the testcase for that older issue also requires
> adjusting. The below passes testing, anyway.
More information about the Gcc-patches