public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "redi at gcc dot gnu dot org" <gcc-bugzilla@gcc.gnu.org>
To: gcc-bugs@gcc.gnu.org
Subject: [Bug c++/42330] undefined reference to "static const int" in class when passing as "const int &" to a function
Date: Tue, 08 Dec 2009 09:49:00 -0000 [thread overview]
Message-ID: <20091208094854.3014.qmail@sourceware.org> (raw)
In-Reply-To: <bug-42330-18537@http.gcc.gnu.org/bugzilla/>
------- Comment #3 from redi at gcc dot gnu dot org 2009-12-08 09:48 -------
(In reply to comment #2)
> and i don't want to write lots of "const int A<N>::i"...
You have to, your code is not valid if you use A::i in the program but it has
no definition. This is not a compiler bug.
*** This bug has been marked as a duplicate of 42101 ***
--
redi at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42330
next prev parent reply other threads:[~2009-12-08 9:49 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-12-08 4:31 [Bug c++/42330] New: " aijunbai at gmail dot com
2009-12-08 9:18 ` [Bug c++/42330] " paolo dot carlini at oracle dot com
2009-12-08 9:47 ` aijunbai at gmail dot com
2009-12-08 9:49 ` redi at gcc dot gnu dot org [this message]
2009-12-08 9:50 ` redi at gcc dot gnu dot org
2009-12-08 11:52 ` aijunbai at gmail dot com
2009-12-08 12:23 ` redi at gcc dot gnu dot org
2009-12-08 13:02 ` aijunbai at gmail dot com
2009-12-08 13:13 ` paolo dot carlini at oracle dot com
2009-12-08 14:06 ` aijunbai at gmail dot com
2009-12-08 14:15 ` paolo dot carlini at oracle dot com
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=20091208094854.3014.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).