public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "sir_nawaz959 at yahoo dot com" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/52688] static local variable can accessed from local class of function template
Date: Sat, 24 Mar 2012 16:32:00 -0000 [thread overview]
Message-ID: <bug-52688-4-oEMmVVdO0r@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-52688-4@http.gcc.gnu.org/bugzilla/>
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52688
--- Comment #3 from Sarfaraz Nawaz <sir_nawaz959 at yahoo dot com> 2012-03-24 15:25:22 UTC ---
(In reply to comment #2)
> http://gcc.gnu.org/wiki/VerboseDiagnostics#missing_static_const_definition
Jonathan, that is a different case. A static (const or otherwise) member of a
class needs a definition in order to take its address, but the bug I reported
is not about static member of a class, rather it is about a static variable
local to a function template. Interestingly as I said, this code compiles fine
in gcc-4.5.1, but not in gcc-4.6.1.
Also, if I do the same in a non-template function, it works fine, as expected.
next prev parent reply other threads:[~2012-03-24 15:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-23 17:20 [Bug c++/52688] New: " sir_nawaz959 at yahoo dot com
2012-03-23 18:02 ` [Bug c++/52688] " giulianodammando at libero dot it
2012-03-24 15:20 ` redi at gcc dot gnu.org
2012-03-24 16:32 ` sir_nawaz959 at yahoo dot com [this message]
2012-03-25 4:27 ` redi at gcc dot gnu.org
2012-03-26 15:44 ` redi at gcc dot gnu.org
2012-03-26 15:56 ` sir_nawaz959 at yahoo dot com
2013-01-16 9:04 ` daniel.kruegler at googlemail dot com
2013-03-01 19:54 ` jared.cantwell at gmail dot com
2013-03-01 23:09 ` paolo.carlini at oracle dot com
2013-03-01 23:16 ` paolo.carlini at oracle dot com
2013-03-01 23:19 ` jared.cantwell at gmail dot com
2013-03-01 23:24 ` paolo.carlini at oracle dot com
2013-03-02 11:18 ` paolo at gcc dot gnu.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=bug-52688-4-oEMmVVdO0r@http.gcc.gnu.org/bugzilla/ \
--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).