public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* libstdc++/6641: -D__USE_MALLOC doesn't link
@ 2002-05-12 17:16 Sylvain.Pion
0 siblings, 0 replies; 2+ messages in thread
From: Sylvain.Pion @ 2002-05-12 17:16 UTC (permalink / raw)
To: gcc-gnats; +Cc: Sylvain.Pion
>Number: 6641
>Category: libstdc++
>Synopsis: -D__USE_MALLOC doesn't link
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun May 12 17:16:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: Sylvain Pion
>Release: 3.1 and 3.2
>Organization:
>Environment:
Reading specs from /u/zosma/0/prisme/spion/gcc/Linux_3.1/lib/gcc-lib/i686-pc-linux-gnu/3.1/specs
Configured with: /u/zosma/0/prisme/spion/gcc/gcc-3.1-branch/configure --disable-shared --enable-languages=c++ --prefix=/u/zosma/0/prisme/spion/gcc/Linux_3.1 --with-gnu-as --with-gnu-ld --with-as=/u/zosma/0/prisme/spion/gcc/Binutils/Linux/bin/as --with-ld=/u/zosma/0/prisme/spion/gcc/Binutils/Linux/bin/ld
Thread model: single
gcc version 3.1 20020509 (prerelease)
>Description:
Compiling the attached program with -D__USE_MALLOC
produces the following error at link. It's a regression
from 3.0.
/tmp/ccRjeIw2.o: In function `std::__simple_alloc<int, std::__malloc_alloc_template<(int)0> >::allocate(unsigned)':
/tmp/ccRjeIw2.o(.gnu.linkonce.t._ZNSt14__simple_allocIiSt23__malloc_alloc_templateILi0EEE8allocateEj+0x16): undefined reference to `std::__malloc_alloc_template<(int)0>::allocate(unsigned)'
/tmp/ccRjeIw2.o: In function `std::__simple_alloc<int, std::__malloc_alloc_template<(int)0> >::deallocate(int*, unsigned)':
/tmp/ccRjeIw2.o(.gnu.linkonce.t._ZNSt14__simple_allocIiSt23__malloc_alloc_templateILi0EEE10deallocateEPij+0x1d): undefined reference to `std::__malloc_alloc_template<(int)0>::deallocate(void*, unsigned)'
collect2: ld returned 1 exit status
>How-To-Repeat:
// compile and link the following program with
// -D__USE_MALLOC
#include <memory>
#include <vector>
int main()
{
std::vector<int> V(1);
return 0;
}
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: libstdc++/6641: -D__USE_MALLOC doesn't link
@ 2002-05-13 13:20 ljrittle
0 siblings, 0 replies; 2+ messages in thread
From: ljrittle @ 2002-05-13 13:20 UTC (permalink / raw)
To: Sylvain.Pion, gcc-bugs, gcc-prs, ljrittle, nobody
Synopsis: -D__USE_MALLOC doesn't link
Responsible-Changed-From-To: unassigned->ljrittle
Responsible-Changed-By: ljrittle
Responsible-Changed-When: Mon May 13 13:20:30 2002
Responsible-Changed-Why:
My pet issue.
State-Changed-From-To: open->closed
State-Changed-By: ljrittle
State-Changed-When: Mon May 13 13:20:30 2002
State-Changed-Why:
You are correct in that this is a change from 2.95 and
perhaps 3.0 (the only correct use of __USE_MALLOC was
surely documented by the 3.0 release but it is possible
that it still "worked").
The libstdc++-v3 documentation now explicitly says that
you must rebuild the entire library to define library
implementation macros such as __USE_MALLOC.
The use of macros in the library implementation name space,
such as __USE_MALLOC, which may change internal
implementation can violate the one-definition rule of C++.
A patch that correctly handles all one-definition issues
with such a macro might be accepted. However, I will be
holding my nose.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=6641
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-05-13 20:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-12 17:16 libstdc++/6641: -D__USE_MALLOC doesn't link Sylvain.Pion
2002-05-13 13:20 ljrittle
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).