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]

[libstc++] Problems with ext/slist (patch included)


Including slist does not work. Compiling the minimal source code
tslist1.C 

#include <ext/slist>

int main() {}

generates many errors. The appended patch fixes these problems by
including the appropriate header files. 

Hope this helps,

Peter Schmid

g++ -v tslist1.C 
Reading specs from /usr/local/lib/gcc-lib/i686-pc-linux-gnu/3.1/specs
Configured with: ../gcc/configure --enable-shared --disable-nls --enable-threads=posix --enable-long-long --enable-languages=c,c++,f77,objc
gcc version 3.1 20010420 (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__STDC_HOSTED__=1 -Acpu=i386 -Amachine=i386 -Di386 -D__i386 -D__i386__ -D__tune_i686__ -D__tune_pentiumpro__ tslist1.C -D__GNUG__=3 -D_GNU_SOURCE -D__DEPRECATED -D__EXCEPTIONS -D__GXX_ABI_VERSION=100 -quiet -dumpbase tslist1.C -version -o /tmp/ccJiISya.s
GNU CPP version 3.1 20010420 (experimental) (cpplib) (i386 Linux/ELF)
GNU C++ version 3.1 20010420 (experimental) (i686-pc-linux-gnu)
	compiled by GNU C version 3.1 20010420 (experimental).
#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/local/i686-pc-linux-gnu/include
 /usr/include
End of search list.
In file included from tslist1.C:1:
/usr/local/include/g++-v3/ext/slist:98: syntax error before `(' token
/usr/local/include/g++-v3/ext/slist:101: syntax error before `!=' token
/usr/local/include/g++-v3/ext/slist:101: base operand of `->' is not a pointer
/usr/local/include/g++-v3/ext/slist:101: parse error before `)' token
/usr/local/include/g++-v3/ext/slist:108: parse error before `{' token
/usr/local/include/g++-v3/ext/slist:114: parse error before `;' token
/usr/local/include/g++-v3/ext/slist:115: parse error before `;' token
/usr/local/include/g++-v3/ext/slist:116: parse error before `;' token
/usr/local/include/g++-v3/ext/slist:118: syntax error before `*' token
/usr/local/include/g++-v3/ext/slist:120: parse error before `*' token
/usr/local/include/g++-v3/ext/slist:120: missing ';' before right brace
/usr/local/include/g++-v3/ext/slist:121: semicolon missing after declaration of 
   `_Slist_iterator_base'
/usr/local/include/g++-v3/ext/slist:121: ISO C++ forbids defining types within 
   return type
/usr/local/include/g++-v3/ext/slist:121: two or more data types in declaration 
   of `_M_incr'
/usr/local/include/g++-v3/ext/slist:121: semicolon missing after declaration of 
   `struct _Slist_iterator_base'
/usr/local/include/g++-v3/ext/slist: In function `int _M_incr()':
/usr/local/include/g++-v3/ext/slist:121: `_M_node' undeclared (first use this 
   function)
/usr/local/include/g++-v3/ext/slist:121: (Each undeclared identifier is 
   reported only once for each function it appears in.)
/usr/local/include/g++-v3/ext/slist: At global scope:
/usr/local/include/g++-v3/ext/slist:123: non-member function `bool 
   operator==(const _Slist_iterator_base&)' cannot have `const' method 
   qualifier
/usr/local/include/g++-v3/ext/slist:123: `bool operator==(const 
   _Slist_iterator_base&)' must take exactly two arguments
/usr/local/include/g++-v3/ext/slist: In function `bool operator==(const 
   _Slist_iterator_base&)':
/usr/local/include/g++-v3/ext/slist:124: `struct _Slist_iterator_base' has no 
   member named `_M_node'
/usr/local/include/g++-v3/ext/slist: At global scope:
/usr/local/include/g++-v3/ext/slist:126: non-member function `bool 
   operator!=(const _Slist_iterator_base&)' cannot have `const' method 
   qualifier
/usr/local/include/g++-v3/ext/slist:126: `bool operator!=(const 
   _Slist_iterator_base&)' must take exactly two arguments
/usr/local/include/g++-v3/ext/slist: In function `bool operator!=(const 
   _Slist_iterator_base&)':
/usr/local/include/g++-v3/ext/slist:127: `struct _Slist_iterator_base' has no 
   member named `_M_node'
/usr/local/include/g++-v3/ext/slist: At global scope:
/usr/local/include/g++-v3/ext/slist:129: parse error before `}' token
/usr/local/include/g++-v3/ext/slist:175: parse error before `<' token
/usr/local/include/g++-v3/ext/slist:177: parse error before `)' token
/usr/local/include/g++-v3/ext/slist:179: parse error before `&' token
/usr/local/include/g++-v3/ext/slist:179: ISO C++ forbids defining types within 
   return type
/usr/local/include/g++-v3/ext/slist:179: semicolon missing after declaration of 
   `class _Slist_alloc_base<_Tp, _Allocator, _IsStatic>'
/usr/local/include/g++-v3/ext/slist:179: declaration of template 
   `template<class _Tp, class _Allocator, bool _IsStatic> int 
   _Slist_alloc_base(...)'
/usr/local/include/g++-v3/ext/slist:173: conflicts with previous declaration 
   `template<class _Tp, class _Allocator, bool _IsStatic> class 
   _Slist_alloc_base'
/usr/local/include/g++-v3/ext/slist:173: previous non-function declaration 
   `template<class _Tp, class _Allocator, bool _IsStatic> class 
   _Slist_alloc_base'
/usr/local/include/g++-v3/ext/slist:179: conflicts with function declaration 
   `template<class _Tp, class _Allocator, bool _IsStatic> int 
   _Slist_alloc_base(...)'
/usr/local/include/g++-v3/ext/slist: In function `int _Slist_alloc_base(...)':
/usr/local/include/g++-v3/ext/slist:179: base initializers not allowed for 
   non-member functions
/usr/local/include/g++-v3/ext/slist: At global scope:
/usr/local/include/g++-v3/ext/slist:181: parse error before `$'
/usr/local/include/g++-v3/ext/slist:184: `_Tp' was not declared in this scope
/usr/local/include/g++-v3/ext/slist:184: template argument 1 is invalid
/usr/local/include/g++-v3/ext/slist: In function `void _M_put_node(int*)':
/usr/local/include/g++-v3/ext/slist:185: `_M_node_allocator' undeclared (first 
   use this function)
/usr/local/include/g++-v3/ext/slist: At global scope:
/usr/local/include/g++-v3/ext/slist:187: parse error before `$'
/usr/local/include/g++-v3/ext/slist:190: '_Slist_node_base' is used as a type, 
   but is not defined as a type.
/usr/local/include/g++-v3/ext/slist:191: parse error before `}' token
/usr/local/include/g++-v3/ext/slist:195: non-template type `_Slist_alloc_base' 
   used as a template
/usr/local/include/g++-v3/ext/slist:195: confused by earlier errors, bailing out

2001-04-24  Peter Schmid  <schmid@snake.iap.physik.tu-darmstadt.de>

        * include/ext/slist: Include required header files. 

*** libstdc++-v3/include/ext/slist.orig	Fri Apr 13 16:01:37 2001
--- libstdc++-v3/include/ext/slist	Sun Apr 22 22:54:30 2001
***************
*** 19,24 ****
--- 19,28 ----
  #ifndef __SGI_STL_INTERNAL_SLIST_H
  #define __SGI_STL_INTERNAL_SLIST_H
  
+ #include <bits/stl_algobase.h>
+ #include <bits/stl_alloc.h>
+ #include <bits/stl_construct.h>
+ #include <bits/stl_uninitialized.h>
  #include <bits/concept_check.h>
  
  namespace std


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