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 c++/52995] New: Change in the handling of templates and visibility attributes


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

             Bug #: 52995
           Summary: Change in the handling of templates and visibility
                    attributes
    Classification: Unclassified
           Product: gcc
           Version: unknown
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: rafael.espindola@gmail.com


in
-----------------------
#define HIDDEN __attribute__((visibility("hidden")))
#define DEFAULT __attribute__((visibility("default")))

template <class T> struct HIDDEN A {
  static void DEFAULT bar();
};
struct HIDDEN H;
struct DEFAULT D;

void test() {
  A<D>::bar(); // default                                                       
  A<H>::bar(); // hidden                                                        
}
------------------------

gcc 4.5 would produce two default symbols (_ZN1AI1DE3barEv and
_ZN1AI1HE3barEv). Gcc 4.7 makes _ZN1AI1HE3barEv hidden.

I can't see why the hidden template argument should make A<H> "more hidden"
than A<D>.


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