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: gcc visibility used by moz


Gabriel Dos Reis wrote:
>> Joe Buck wrote:
Now, this being a conscious decision for ODR violation, it would
probably need to be documented because then we may have

typeinfo1 != typeinfo2

and yet

!typeinfo1.before(typeinfo2) && !typeinfo2.before(typeinfo1)

There are probably other inconsistencies to audit.

| We can have two distinct
| classes named S, and no one can tell.  Each bit of code will see one
| definition of S.

I think that Joe's point is that IF you have two classes named S, then they're hidden away in separate shared libraries and you can't compare them, because no piece of code knows about both of them. Any class that is part of the public interface of a shared library is part of the public interface, and therefore must be unique through the program.


In any case, this ODR business seems rather tangential to the discussion of visibility semantics. The primary purpose of the visibility work is limiting the number of symbols exported from a particular shared library in order to cut down on load time. Can we please focus on the semantics we want for that instead of trying to solve a theoretical problem that has been around as long as people have tried to use shared libraries with C++?

Jason


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