This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: End-of-unit changes in decl visibility


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>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]