TREE_PUBLIC vs DECL_EXTERNAL
Richard Henderson
rth@redhat.com
Tue May 28 21:10:00 GMT 2002
On Tue, May 28, 2002 at 09:23:36PM -0400, Jason Merrill wrote:
> 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?
No, TREE_STATIC means it's static-storage-duration. If I understand
properly. Or perhaps now that DECL_THREAD_LOCAL exists, it means
thread-or-static. In either case, I'd think TREE_STATIC would have
to always be set for a function.
Seems easy enough to distinguish declaration from definition based on
whether the decl is initialized.
> check_global_declarations checks DECL_EXTERNAL to determine whether or not
> a static function has been defined.
Hum. So it does.
r~
More information about the Gcc-patches
mailing list