This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [debug-early] fix problem with template parameter packs


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]