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: PATCH for debug/23336 - enums types missing from debug info


Daniel Jacobowitz wrote:

> This is a general problem with the compiler right now: TREE_USED
> is often set for types during parsing, but we don't know until late whether
> we're going to emit them. 

Right.  TREE_USED should be taken to mean "this entity was referenced in
the input source code".  As we have for global functions and variables,
I think we should use cgraph (or, more generally, the same kinds of
graph structures that are there) to tell us what types are actually
referenced, so that we can use that for controlling debugging output.

> Anyway, in the mean time, let's at least fix enums!

Indeed.

> I would appreciate a C++ maintainer looking at this; I'm not sure if I put
> it in the right place.  It's remarkably annoying that there's a second copy
> of this entire layer of the C++ frontend for template instantiation.

Well, that's C++ for you.  We do try to share most of that code (both
parser.c and pt.c use semantics.c heavily), but some things are Just
Different between the two passes.

> 	* dwarf2out.c (dwarf2out_abstract_function): Save and restore
> 	cfun also.

Why is this necessary?  (It doesn't seem bad to me; just curious.)

The C++ changes are fine.  I'll let a C maintainer review the C bits.
Once you answer the question above, I'll re-review the DWARF bits.

Thanks,

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


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