This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: End-of-unit changes in decl visibility
- From: Geoff Keating <geoffk at geoffk dot org>
- To: Richard Sandiford <rsandifo at redhat dot com>
- Cc: gcc at gcc dot gnu dot org
- Date: 24 Nov 2003 13:48:18 -0800
- Subject: Re: End-of-unit changes in decl visibility
- References: <87oev86ojk.fsf@redhat.com>
Richard Sandiford <rsandifo@redhat.com> writes:
> Short version: is there an easy way to tell which decls might change
> visibility at the end of compilation?
In general, I believe *any* decl might change visibility, in some sense.
I know the following transitions are possible:
DECL_EXTERNAL -> ! DECL_EXTERNAL
TREE_PUBLIC -> ! TREE_PUBLIC
! DECL_WEAK -> DECL_WEAK
DECL_ONE_ONLY -> ! DECL_ONE_ONLY
DECL_COMDAT -> ! DECL_COMDAT
DECL_VISIBILITY == VISIBILITY_DEFAULT -> any other setting
I don't know for sure that any other transitions are possible, but I
would not be surprised.
--
- Geoffrey Keating <geoffk@geoffk.org>