This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: PATCH RFC: PR 33094: Test DECL_INITIAL in make_rtl_for_nonlocal_decl
- From: Mark Mitchell <mark at codesourcery dot com>
- To: Jason Merrill <jason at redhat dot com>
- Cc: Ian Lance Taylor <iant at google dot com>, gcc-patches at gcc dot gnu dot org
- Date: Sun, 30 Sep 2007 10:36:53 -0700
- Subject: Re: PATCH RFC: PR 33094: Test DECL_INITIAL in make_rtl_for_nonlocal_decl
- References: <m3d4xmqj5c.fsf@localhost.localdomain> <46C63895.9040001@codesourcery.com> <46FD4C8A.3020707@redhat.com>
Jason Merrill wrote:
> DECL_EXTERNAL doesn't indicate whether or not something is defined, it
> indicates whether or not we need to call assemble_external when we see a
> reference to it.
Fair enough. Indeed, the documentation for DECL_EXTERNAL in tree.h
makes clear that DECL_EXTERNAL may be set at the same time that a
definition is available; DECL_EXTERNAL just means that if you reference
the object in this translation unit, you're generating an external
reference.
> 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?
In any case,
> 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...)
Thanks,
--
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713