This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [C++ RFC/Patch] PR 58561
- From: Cary Coutant <ccoutant at google dot com>
- To: Paolo Carlini <paolo dot carlini at oracle dot com>
- Cc: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>, Jason Merrill <jason at redhat dot com>
- Date: Wed, 29 Jan 2014 09:41:50 -0800
- Subject: Re: [C++ RFC/Patch] PR 58561
- Authentication-results: sourceware.org; auth=none
- References: <52E2F3B6 dot 4050003 at oracle dot com>
> in this bug we ICE in dwarf2out.c:is_base_type with -g, because it doesn't
> know how to handle the TEMPLATE_TYPE_PARM coming from the C++ front-end and
> representing 'auto' in this kind of C++1y code.
>
> That it shouldn't ICE and return 0 instead I'm pretty sure, I'm less sure
> about the next problem, that is what gen_type_die_with_usage should do:
> build a DW_TAG_unspecified_type, like happens for NULLPTR_TYPE or
> LANG_TYPE?!? Anyway, my wild guessing resulted in adding an hook, per the
> below draft (in any case, tentative names and comments but passes testing).
> Or we want something completely different?
We've been discussing this in the DWARF workgroup, and the current
proposal on the table is to use DW_TAG_unspecified_type, as you have
done here. This looks OK to me (although I kind of wish we had a
better way of testing for "auto" than doing a string compare!).
Depending on further discussions in the workgroup, we'll probably need
to do a bit more work to support auto return types, but I think this
is the right direction.
-cary