This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [debug-early] fix problem with template parameter packs
- From: Jason Merrill <jason at redhat dot com>
- To: Aldy Hernandez <aldyh at redhat dot com>, Richard Biener <richard dot guenther at gmail dot com>
- Cc: gcc-patches <gcc-patches at gcc dot gnu dot org>
- Date: Thu, 04 Jun 2015 14:23:55 -0400
- Subject: Re: [debug-early] fix problem with template parameter packs
- Authentication-results: sourceware.org; auth=none
- References: <55482AF6 dot 1090207 at redhat dot com> <5549314D dot 6080804 at redhat dot com> <5549373F dot 6020503 at redhat dot com> <554A4146 dot 4010501 at redhat dot com> <5564A158 dot 8010604 at redhat dot com> <55661C58 dot 6040305 at redhat dot com> <556EFB62 dot 3040209 at redhat dot com> <CAFiYyc0ED7vRnfK+fC8u4wo0XJWfYznYe3Dhgp4Qw1U5U73ULw at mail dot gmail dot com> <556F1256 dot 1030400 at redhat dot com>
On 06/03/2015 10:42 AM, Aldy Hernandez wrote:
+ /* Die was generated early via dwarf2out_early_global_decl. */
+ BOOL_BITFIELD dumped_early : 1;
Missed a "dump".
Actually, why do we need this flag? The uses I see are
* to avoid declaring prototype parameters multiple times
Can't we just assume that if we have an old DIE, it already has parameters?
* to make the logic in gen_variable_die even more horrible
It's really not clear to me that we need the new big block of code. I
would think that it should be enough to update this:
/* If the compiler emitted a definition for the DECL declaration
+ and we already emitted a DIE for it, don't emit a second
DIE for it again. Allow re-declarations of DECLs that are
inside functions, though. */
- if (old_die && declaration && !local_scope_p (context_die))
return;
to add locations instead of just returning when !early_dwarf.
Incidentally, why did you change "declaration" to "!declaration" in this
condition?
Jason