public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/29417] New: link fails with debug and anonymous namespace
@ 2006-10-10 16:16 peter at chocky dot org
2006-10-10 16:17 ` [Bug c++/29417] " peter at chocky dot org
` (7 more replies)
0 siblings, 8 replies; 9+ messages in thread
From: peter at chocky dot org @ 2006-10-10 16:16 UTC (permalink / raw)
To: gcc-bugs
This is with:
gcc (GCC) 4.2.0 20061007 (experimental)
On x86 Debian and under Fedora Core 3.
Using the lamba part of the boost library, the following is seen:
/tmp/ccNdhcXx.o:(.debug_info+0xec9): undefined reference to
`boost::lambda::(anonymous namespace)::free2'
/tmp/ccNdhcXx.o:(.debug_info+0xed8): undefined reference to
`boost::lambda::(anonymous namespace)::free3'
/tmp/ccNdhcXx.o:(.debug_info+0x47f2): undefined reference to
`boost::lambda::(anonymous namespace)::free2'
/tmp/ccNdhcXx.o:(.debug_info+0x4806): undefined reference to
`boost::lambda::(anonymous namespace)::free3'
I don't think the fault is in the boost library. Here is the code in question:
namespace {
// These are constants types and need to be initialised
boost::lambda::placeholder1_type free1 = boost::lambda::placeholder1_type();
boost::lambda::placeholder2_type free2 = boost::lambda::placeholder2_type();
boost::lambda::placeholder3_type free3 = boost::lambda::placeholder3_type();
boost::lambda::placeholder1_type& _1 = free1;
boost::lambda::placeholder2_type& _2 = free2;
boost::lambda::placeholder3_type& _3 = free3;
// _1, _2, ... naming scheme by Peter Dimov
} // unnamed
To trigger the problem requires at least -O and -g2. My C++ isn't good enough
to comment further. I attach a minimal preprocessed case. compile with:
g++-4.2 test.ii -O -g2
This works correctly on previous GCC versions, and with -g1.
--
Summary: link fails with debug and anonymous namespace
Product: gcc
Version: 4.2.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: peter at chocky dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29417
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/29417] link fails with debug and anonymous namespace
2006-10-10 16:16 [Bug c++/29417] New: link fails with debug and anonymous namespace peter at chocky dot org
@ 2006-10-10 16:17 ` peter at chocky dot org
2006-10-10 16:49 ` [Bug c++/29417] [4.2 Regression] " pinskia at gcc dot gnu dot org
` (6 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: peter at chocky dot org @ 2006-10-10 16:17 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from peter at chocky dot org 2006-10-10 16:17 -------
Created an attachment (id=12405)
--> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=12405&action=view)
minimal test case
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29417
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/29417] [4.2 Regression] link fails with debug and anonymous namespace
2006-10-10 16:16 [Bug c++/29417] New: link fails with debug and anonymous namespace peter at chocky dot org
2006-10-10 16:17 ` [Bug c++/29417] " peter at chocky dot org
@ 2006-10-10 16:49 ` pinskia at gcc dot gnu dot org
2006-10-11 1:21 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-10-10 16:49 UTC (permalink / raw)
To: gcc-bugs
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Severity|normal |critical
Keywords| |link-failure
Summary|link fails with debug and |[4.2 Regression] link fails
|anonymous namespace |with debug and anonymous
| |namespace
Target Milestone|--- |4.2.0
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29417
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/29417] [4.2 Regression] link fails with debug and anonymous namespace
2006-10-10 16:16 [Bug c++/29417] New: link fails with debug and anonymous namespace peter at chocky dot org
2006-10-10 16:17 ` [Bug c++/29417] " peter at chocky dot org
2006-10-10 16:49 ` [Bug c++/29417] [4.2 Regression] " pinskia at gcc dot gnu dot org
@ 2006-10-11 1:21 ` pinskia at gcc dot gnu dot org
2006-10-11 2:49 ` pinskia at gcc dot gnu dot org
` (4 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-10-11 1:21 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from pinskia at gcc dot gnu dot org 2006-10-11 01:21 -------
Reducing.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29417
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/29417] [4.2 Regression] link fails with debug and anonymous namespace
2006-10-10 16:16 [Bug c++/29417] New: link fails with debug and anonymous namespace peter at chocky dot org
` (2 preceding siblings ...)
2006-10-11 1:21 ` pinskia at gcc dot gnu dot org
@ 2006-10-11 2:49 ` pinskia at gcc dot gnu dot org
2006-10-11 2:51 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-10-11 2:49 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pinskia at gcc dot gnu dot org 2006-10-11 02:48 -------
Reduced testcase:
template <int>
struct lambda_functor
{
lambda_functor() {}
};
namespace {
lambda_functor<2 > free2;
lambda_functor<3 > free3;
lambda_functor<3 > & _3 = free3;
}
int main (void){}
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed|0 |1
Last reconfirmed|0000-00-00 00:00:00 |2006-10-11 02:48:51
date| |
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29417
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/29417] [4.2 Regression] link fails with debug and anonymous namespace
2006-10-10 16:16 [Bug c++/29417] New: link fails with debug and anonymous namespace peter at chocky dot org
` (3 preceding siblings ...)
2006-10-11 2:49 ` pinskia at gcc dot gnu dot org
@ 2006-10-11 2:51 ` pinskia at gcc dot gnu dot org
2006-10-15 21:23 ` mmitchel at gcc dot gnu dot org
` (2 subsequent siblings)
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-10-11 2:51 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pinskia at gcc dot gnu dot org 2006-10-11 02:50 -------
I think this is related to PR 27657.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
BugsThisDependsOn| |27657
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29417
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/29417] [4.2 Regression] link fails with debug and anonymous namespace
2006-10-10 16:16 [Bug c++/29417] New: link fails with debug and anonymous namespace peter at chocky dot org
` (4 preceding siblings ...)
2006-10-11 2:51 ` pinskia at gcc dot gnu dot org
@ 2006-10-15 21:23 ` mmitchel at gcc dot gnu dot org
2006-10-17 16:26 ` janis at gcc dot gnu dot org
2006-10-20 7:42 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2006-10-15 21:23 UTC (permalink / raw)
To: gcc-bugs
--
mmitchel at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Priority|P3 |P1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29417
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/29417] [4.2 Regression] link fails with debug and anonymous namespace
2006-10-10 16:16 [Bug c++/29417] New: link fails with debug and anonymous namespace peter at chocky dot org
` (5 preceding siblings ...)
2006-10-15 21:23 ` mmitchel at gcc dot gnu dot org
@ 2006-10-17 16:26 ` janis at gcc dot gnu dot org
2006-10-20 7:42 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: janis at gcc dot gnu dot org @ 2006-10-17 16:26 UTC (permalink / raw)
To: gcc-bugs
------- Comment #5 from janis at gcc dot gnu dot org 2006-10-17 16:25 -------
A regression hunt on powerpc-linux identified the following patch:
http://gcc.gnu.org/viewcvs?view=rev&rev=115086
r115086 | jason | 2006-06-30 01:15:56 +0000 (Fri, 30 Jun 2006)
--
janis at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jason at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29417
^ permalink raw reply [flat|nested] 9+ messages in thread
* [Bug c++/29417] [4.2 Regression] link fails with debug and anonymous namespace
2006-10-10 16:16 [Bug c++/29417] New: link fails with debug and anonymous namespace peter at chocky dot org
` (6 preceding siblings ...)
2006-10-17 16:26 ` janis at gcc dot gnu dot org
@ 2006-10-20 7:42 ` pinskia at gcc dot gnu dot org
7 siblings, 0 replies; 9+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-10-20 7:42 UTC (permalink / raw)
To: gcc-bugs
------- Comment #6 from pinskia at gcc dot gnu dot org 2006-10-20 07:42 -------
(In reply to comment #5)
> A regression hunt on powerpc-linux identified the following patch:
This just confirms the problem here is the same as listed in PR 27657 as that
patch cause anonymous namespace to be local linkage. Closing as a dup of PR
27657.
*** This bug has been marked as a duplicate of 27657 ***
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29417
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2006-10-20 7:42 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-10 16:16 [Bug c++/29417] New: link fails with debug and anonymous namespace peter at chocky dot org
2006-10-10 16:17 ` [Bug c++/29417] " peter at chocky dot org
2006-10-10 16:49 ` [Bug c++/29417] [4.2 Regression] " pinskia at gcc dot gnu dot org
2006-10-11 1:21 ` pinskia at gcc dot gnu dot org
2006-10-11 2:49 ` pinskia at gcc dot gnu dot org
2006-10-11 2:51 ` pinskia at gcc dot gnu dot org
2006-10-15 21:23 ` mmitchel at gcc dot gnu dot org
2006-10-17 16:26 ` janis at gcc dot gnu dot org
2006-10-20 7:42 ` pinskia at gcc dot gnu dot org
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).