public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "jbeulich at novell dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/19238] cannot change visibility of static variable in function template
Date: Mon, 03 Jan 2005 12:47:00 -0000	[thread overview]
Message-ID: <20050103124736.25181.qmail@sourceware.org> (raw)
In-Reply-To: <20050103105200.19238.jbeulich@novell.com>


------- 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


  parent reply	other threads:[~2005-01-03 12:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-03 10:52 [Bug c++/19238] New: " jbeulich at novell dot com
2005-01-03 11:05 ` [Bug c++/19238] " giovannibajo at libero dot it
2005-01-03 12:47 ` jbeulich at novell dot com [this message]
2005-01-03 13:00 ` giovannibajo at libero dot it
2005-01-03 16:14 ` mmitchel at gcc dot gnu dot org
     [not found] <bug-19238-1068@http.gcc.gnu.org/bugzilla/>
2006-03-21  2:49 ` jason at gcc dot gnu dot org
2006-03-21  3:19 ` jason at gcc dot gnu dot org
2006-03-21 16:33 ` pinskia at gcc dot gnu dot org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050103124736.25181.qmail@sourceware.org \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).