public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/29646] New: undefined references to static const int members
@ 2006-10-30 11:17 christian dot heinlein at uni-ulm dot de
2006-10-30 11:42 ` [Bug c++/29646] " christian dot heinlein at uni-ulm dot de
0 siblings, 1 reply; 2+ messages in thread
From: christian dot heinlein at uni-ulm dot de @ 2006-10-30 11:17 UTC (permalink / raw)
To: gcc-bugs
Compilation of the program below produces:
/tmp/cclEBTTX.o(.gnu.linkonce.t._ZN1XC1Eb+0x1a): In function
`X::X[in-charge](bool)':
: undefined reference to `X::a'
/tmp/cclEBTTX.o(.gnu.linkonce.t._ZN1XC1Eb+0x24): In function
`X::X[in-charge](bool)':
: undefined reference to `X::b'
collect2: ld returned 1 exit status
struct X {
static const int a = 1, b = 2;
int x;
X (bool f) : x(f ? a : b) {}
};
X x(true);
int main () {}
Replacing e. g. "a" with "a+0" makes the errors disappear.
--
Summary: undefined references to static const int members
Product: gcc
Version: 3.3.4
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: christian dot heinlein at uni-ulm dot de
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29646
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug c++/29646] undefined references to static const int members
2006-10-30 11:17 [Bug c++/29646] New: undefined references to static const int members christian dot heinlein at uni-ulm dot de
@ 2006-10-30 11:42 ` christian dot heinlein at uni-ulm dot de
0 siblings, 0 replies; 2+ messages in thread
From: christian dot heinlein at uni-ulm dot de @ 2006-10-30 11:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from christian dot heinlein at uni-ulm dot de 2006-10-30 11:41 -------
*** This bug has been marked as a duplicate of 29645 ***
--
christian dot heinlein at uni-ulm dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29646
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-10-30 11:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-30 11:17 [Bug c++/29646] New: undefined references to static const int members christian dot heinlein at uni-ulm dot de
2006-10-30 11:42 ` [Bug c++/29646] " christian dot heinlein at uni-ulm dot de
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).