This is the mail archive of the gcc-bugs@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]

[Bug middle-end/48323] [4.5/4.6/4.7 Regression] Lifetime of local variables: global versus member function


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48323

--- Comment #5 from Andrew Pinski <pinskia at gcc dot gnu.org> 2011-03-28 22:25:00 UTC ---
(In reply to comment #4)
> (In reply to comment #3)
> Sorry for being pedantic, but would you care to explain how your observation
> renders this report invalid? I am afraid I do not understand this resolution. 
> 
> Do you assert that the two cases (static local in global vs. class scope
> function) are deliberately treated differently? If so, is this an
> implementation choice, or is it based on a document that I should have read
> (which one)?

Yes they are different because C::class_scope_f is a vague linkage while
global_f is global linkage.  So the i in each one is of different linkage.  If
you want C type to be local to the shared, then you need to use either the
hidden attribute on it or use -fvisibility=hidden.


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