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: [RFC] fix eliminate-unused-debug-types for casts (PR21391)


On Wed, Nov 16, 2005 at 01:14:14PM -0400, Aldy Hernandez wrote:
> Hi folks!
> 
> The problem in this PR is that we don't emit dwarf information for types
> that are only used as casts.
> 
> In the following code, "foo" doesn't get a debugging entry:
> 
> 	struct foo { int i; };
> 
> 	int bar (void) { return ((struct foo *)0x1234)->i; }
> 
> Unfortunately, by the time we get to prune_unused_type*, we no longer
> know how the type was used.  To fix this problem, I mark all DIEs for
> types that are used as casts in the front-end, and then consider these
> types as used, when we are prunning the unused types.

During parsing, yes?  Then we'll mark casts used in parsed but
non-emitted functions as used.  Was this patch superseded by the
discussion on gcc@ about enums?


-- 
Daniel Jacobowitz
CodeSourcery, LLC


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