This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: problems with libstdc++/stl/bitset in 1122 snapshot
- To: "Jeff Sparkes" <jsparkes at internetivity dot com>
- Subject: Re: problems with libstdc++/stl/bitset in 1122 snapshot
- From: Alexandre Oliva <oliva at dcc dot unicamp dot br>
- Date: 27 Nov 1998 02:18:10 -0200
- Cc: <egcs-bugs at cygnus dot com>, egcs-patches at cygnus dot com
- References: <000201be1977$926137c0$1b20872f@internetivity.ca>
On Nov 26, 1998, "Jeff Sparkes" <jsparkes@internetivity.com> wrote:
> First of all, bitset is not included in the list of headers to install
> in Makefile.in
> Once it is installed, I get error from one of the constructors.
Here's a patch. Ok to install?
--
Alexandre Oliva http://www.dcc.unicamp.br/~oliva aoliva@{acm.org}
oliva@{dcc.unicamp.br,gnu.org,egcs.cygnus.com,samba.org}
Universidade Estadual de Campinas, SP, Brasil
Index: libstdc++/ChangeLog
from Alexandre Oliva <oliva@dcc.unicamp.br>
* Makefile.in (HEADERS): Install bitset
Index: libstdc++/Makefile.in
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/libstdc++/Makefile.in,v
retrieving revision 1.22
diff -u -r1.22 Makefile.in
--- libstdc++/Makefile.in 1998/09/17 00:30:53 1.22
+++ libstdc++/Makefile.in 1998/11/27 04:19:54
@@ -26,7 +26,7 @@
cwchar cwctype string stdexcept \
algorithm deque functional hash_map hash_set iterator list map \
memory numeric pthread_alloc queue rope set slist stack utility \
- vector fstream iomanip iostream strstream iosfwd
+ vector fstream iomanip iostream strstream iosfwd bitset
ARLIB = libstdc++.a.$(VERSION)
ARLINK = libstdc++.a
Index: libstdc++/stl/ChangeLog
from Alexandre Oliva <oliva@dcc.unicamp.br>
* bitset: explicitly convert basic_string<...>::npos to size_t in
default argument to constructor, to avoid parse error at `>'
(__STL_EXPLICIT_FUNCTION_TMPL_ARGS): replace #if with #ifdef
Index: libstdc++/stl/bitset
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/libstdc++/stl/bitset,v
retrieving revision 1.1.1.1
diff -u -r1.1.1.1 bitset
--- libstdc++/stl/bitset 1998/09/02 19:28:52 1.1.1.1
+++ libstdc++/stl/bitset 1998/11/27 04:19:55
@@ -626,7 +626,7 @@
template<class _CharT, class _Traits, class _Alloc>
explicit bitset(const basic_string<_CharT,_Traits,_Alloc>& __s,
size_t __pos = 0,
- size_t __n = basic_string<_CharT,_Traits,_Alloc>::npos)
+ size_t __n = size_t(basic_string<_CharT,_Traits,_Alloc>::npos))
: _Base()
{
if (__pos > __s.size())
@@ -753,7 +753,7 @@
unsigned long to_ulong() const { return _M_do_to_ulong(); }
-#if __STL_EXPLICIT_FUNCTION_TMPL_ARGS
+#ifdef __STL_EXPLICIT_FUNCTION_TMPL_ARGS
template <class _CharT, class _Traits, class _Alloc>
basic_string<_CharT, _Traits, _Alloc> to_string() const {
basic_string<_CharT, _Traits, _Alloc> __result;