This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[libstdc++] Problems with backward/alloc.h (patch included)
- To: libstdc++ at gcc dot gnu dot org
- Subject: [libstdc++] Problems with backward/alloc.h (patch included)
- From: Peter Schmid <schmid at snake dot iap dot physik dot tu-darmstadt dot de>
- Date: Sun, 16 Sep 2001 23:06:58 +0200 (CEST)
- cc: gcc-patches at gcc dot gnu dot org, bkoz at redhat dot com
There is a coding error in include/g++-v3/backward/alloc.h which
prevents the compilation of code employing sequence containers.
For example, deques do not work.
The appended patch fixes the problem.
Hope this helps,
Peter Schmid
source code t.C
#include <deque.h>
g++ -c t.C -W -Wall
In file included from /usr/local/include/g++-v3/backward/deque.h:59,
from t.C:1:
/usr/local/include/g++-v3/backward/backward_warning.h:32:2: warning: #warning This file includes at least one deprecated or antiquated header. Please consider using one of the 32 headers found in section 17.4.1.2 of the C++ standard. Examples include substituting the <X> header for the <X.h> header for C++ includes, or <sstream> instead of the deprecated header <strstream.h>. To disable this warning use -Wno-deprecated.
In file included from /usr/local/include/g++-v3/backward/deque.h:61,
from t.C:1:
/usr/local/include/g++-v3/backward/alloc.h:51: `malloc_alloc' not declared
2001-09-04 Scott Johnston <scott@accom.com>
Peter Schmid <schmid@snake.iap.physik.tu-darmstadt.de>
* include/backward/alloc.h: Conditionally define malloc_alloc
*** libstdc++-v3/include/backward/alloc.h.orig Sun Sep 16 21:51:08 2001
--- libstdc++-v3/include/backward/alloc.h Sun Sep 16 21:51:20 2001
***************
*** 48,54 ****
--- 48,56 ----
#include <bits/stl_alloc.h>
using std::__malloc_alloc_template;
+ #ifdef __USE_MALLOC
using std::malloc_alloc;
+ #endif
using std::simple_alloc;
using std::debug_alloc;
#ifndef __USE_MALLOC