This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: TREE_PUBLIC vs DECL_EXTERNAL
- From: Jason Merrill <jason at redhat dot com>
- To: Richard Henderson <rth at redhat dot com>
- Cc: gcc-patches at gcc dot gnu dot org
- Date: Tue, 28 May 2002 21:23:36 -0400
- Subject: Re: TREE_PUBLIC vs DECL_EXTERNAL
- References: <20020528131955.A14376@redhat.com>
>>>>> "Richard" == Richard Henderson <rth@redhat.com> writes:
> I was surprised to discover that we were setting DECL_EXTERNAL
> on static functions. Which is confusing to me, because I
> thought DECL_EXTERNAL means "defined in some other object".
> Which can't be true for !TREE_PUBLIC.
I thought it just meant "not defined yet". How would you distinguish a
static forward decl from a definition? Just by whether or not TREE_STATIC
is set?
check_global_declarations checks DECL_EXTERNAL to determine whether or not
a static function has been defined.
> I also ran into problems with libjava/jni.cc from the C++ front
> end. I'm assuming the problem there is that some of the scary
> DECL_NOT_REALLY_EXTERN stuff slipped through. Certainly I don't
> feel that I understand that code enough to touch it.
I'm currently banging my head against that code, trying to come up with a
more coherent linkage model.
Jason