TREE_PUBLIC vs DECL_EXTERNAL
Jason Merrill
jason@redhat.com
Tue May 28 20:33:00 GMT 2002
>>>>> "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
More information about the Gcc-patches
mailing list