This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: TREE_PUBLIC vs DECL_EXTERNAL
>>>>> "Richard" == Richard Henderson <rth@redhat.com> writes:
> Seems easy enough to distinguish declaration from definition based on
> whether the decl is initialized.
That doesn't work for 'extern inline'; it's a definition, but still
requires an external reference.
The C++ vague linkage stuff is analogous, if significantly more complex;
something that is defined may not be emitted in the current TU. Mark
suggests that we should hide such things from the backend, but what about
e.g. inlining? Such hiding would require separation of the frontend and
backend symbol tables, to no great benefit IMO. I think that it's possible
to clean up the current mess without such drastic measures.
Jason