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++/19238] cannot change visibility of static variable in function template


------- Additional Comments From jbeulich at novell dot com  2005-01-03 12:47 -------
I'm sorry, test case below. The expectation would be that the visibility
attribute gets inherited (as described above) from function template instances
and member functions of class template instances to their static variables.
If that conflicts with anything I can't think of right now, then the backup
solution would be to allow the attribute on such objects.

unsigned gu;

template<typename T> T test() __attribute__((__visibility__("hidden")));
template<typename T> T test() {
	static T st;

	return st = gu;
}

void test() {
	test<unsigned>();
}


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|WAITING                     |NEW
     Ever Confirmed|                            |1


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


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