This is the mail archive of the
mailing list for the GCC project.
Re: PATCH RFC: PR 33094: Test DECL_INITIAL in make_rtl_for_nonlocal_decl
- From: Jason Merrill <jason at redhat dot com>
- To: Mark Mitchell <mark at codesourcery dot com>
- Cc: Ian Lance Taylor <iant at google dot com>, gcc-patches at gcc dot gnu dot org
- Date: Mon, 01 Oct 2007 02:57:16 -0400
- Subject: Re: PATCH RFC: PR 33094: Test DECL_INITIAL in make_rtl_for_nonlocal_decl
- References: <email@example.com> <46C63895.firstname.lastname@example.org> <46FD4C8A.email@example.com> <46FFDEB5.firstname.lastname@example.org>
Mark Mitchell wrote:
Jason Merrill wrote:
DECL_NOT_REALLY_EXTERN also doesn't indicate whether or not something is
defined, it indicates whether or not we should emit it if we have a
definition and it is needed.
Right. I'm sure we could come up with a better name. :-)
I also wonder
whether, in the post-cgraph world, we could simplify a lot of this
handling in the C++ front end. We used to play these games to make sure
that the definitions didn't get emitted for COMDAT functions until
needed -- but, now, cgraph will presumably do that for us.
So, could we just get rid of DECL_NOT_REALLY_EXTERN, and, instead of
setting that, just clear DECL_EXTERNAL?
It does seem like it might be possible to simplify some of this now that
we have cgraph, but I think we still need to leave DECL_EXTERNAL set on
vague linkage entities whether or not we're emitting them.
Tested x86_64-pc-linux-gnu, applied to trunk. I'd like to apply this to 4.2 as well; OK, Mark?
please wait until after the 4.2.2 release and then apply this.
(I'm trying to avoid making the mistake I made with 4.2.2 RC1 where I
kept letting patches in until I felt I had to do RC2...)
Well, this patch seems about as trivial as possible, and is for a 4.2
regression, but OK.