This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: aug-2001 libstdc++ outstanding


I believe you should apply the patch included in
<http://gcc.gnu.org/ml/libstdc++/2001-08/msg00147.html> since it fixes
indeed problems in the backward compatibility headers. The first part
fixes alloc.h, the second part fixes iterator.h for the most
part. There is an additional flaw: Rather than including
<bits/std_iterator.h> iterator.h includes iterator.h, therefore the
ostream_ and istream_iterators are undeclared. The appended patch fixes
all iterator.h related problems and ta.C compiles without a warning.
The patch is versus gcc 3.1.

Hope this helps,

Peter Schmid  

Source code ta.C
#include <iterator.h>

Without the appended patch
g++ -v -c ta.C -W -Wall
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/specs
Configured with: ../gcc/configure --enable-shared --enable-threads=posix --enable-languages=c,c++,f77,objc --disable-nls
Thread model: posix
gcc version 3.1 20010902 (experimental)
 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/cc1plus -v -D__GNUC__=3 -D__GNUC_MINOR__=1 -D__GNUC_PATCHLEVEL__=0 -D__ELF__ -Dunix -Dlinux -D__ELF__ -D__unix__ -D__linux__ -D__unix -D__linux -Asystem=posix -D__NO_INLINE__ -D__STDC_HOSTED__=1 -W -Wall -D_GNU_SOURCE -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i686__ -D__tune_pentiumpro__ ta.C -D__GNUG__=3 -D__DEPRECATED -D__EXCEPTIONS -D__GXX_ABI_VERSION=100 -quiet -dumpbase ta.C -W -Wall -version -o /tmp/ccsYlEJm.s
GNU CPP version 3.1 20010902 (experimental) (cpplib) (i386 Linux/ELF)
GNU C++ version 3.1 20010902 (experimental) (i686-pc-linux-gnu)
	compiled by GNU C version 3.1 20010902 (experimental).
ignoring nonexistent directory "/usr/local/i686-pc-linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include/g++-v3
 /usr/local/include/g++-v3/i686-pc-linux-gnu
 /usr/local/include/g++-v3/backward
 /usr/local/include
 /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/include
 /usr/include
End of search list.
In file included from /usr/local/include/g++-v3/backward/iterator.h:30,
                 from ta.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 ta.C:1:
/usr/local/include/g++-v3/backward/iterator.h:83: `reverse_bidirectional_iterator'
   not declared
/usr/local/include/g++-v3/backward/iterator.h:85: `istream_iterator' not 
   declared
/usr/local/include/g++-v3/backward/iterator.h:86: `ostream_iterator' not 
   declared
/usr/local/include/g++-v3/backward/iterator.h:108: parse error before `}' token


2001-08-14  Scott Johnston <scott.accom.com>
	    Peter Schmid  <schmid@snake.iap.physik.tu-darmstadt.de>
	*   include/backward/iterator.h: include <bits/std_iterator.h>,
	    remove reverse_bidirectional_iterator. 
*** libstdc++-v3/include/backward/iterator.h.orig	Tue Sep  4 20:41:59 2001
--- libstdc++-v3/include/backward/iterator.h	Tue Sep  4 20:42:36 2001
***************
*** 31,37 ****
  #include "function.h"
  #include <stddef.h>
  #include "iostream.h"
! #include "iterator.h"
  
  #include <bits/stl_construct.h>
  #include <bits/stl_raw_storage_iter.h>
--- 31,37 ----
  #include "function.h"
  #include <stddef.h>
  #include "iostream.h"
! #include <bits/std_iterator.h>
  
  #include <bits/stl_construct.h>
  #include <bits/stl_raw_storage_iter.h>
*************** using std::front_inserter;
*** 80,86 ****
  using std::back_inserter;
  
  using std::reverse_iterator;
- using std::reverse_bidirectional_iterator;
  
  using std::istream_iterator;
  using std::ostream_iterator;
--- 80,85 ----
*************** template <class _ForwardIterator>
*** 105,111 ****
    inline void
    destroy(_ForwardIterator __first, _ForwardIterator __last)
    { std::_Destroy(__first, __last); }
! }
  
  // Names from stl_raw_storage_iter.h
  using std::raw_storage_iterator;
--- 104,110 ----
    inline void
    destroy(_ForwardIterator __first, _ForwardIterator __last)
    { std::_Destroy(__first, __last); }
! 
  
  // Names from stl_raw_storage_iter.h
  using std::raw_storage_iterator;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]