This is the mail archive of the
sid@sources.redhat.com
mailing list for the SID project.
c++ error with sid bootstrap-gcc_3.2
- From: bemis <bemis at iol dot unh dot edu>
- To: sid at sources dot redhat dot com, clp <clp at iol dot unh dot edu>
- Date: Mon, 07 Oct 2002 10:25:23 -0400
- Subject: c++ error with sid bootstrap-gcc_3.2
- Organization: University of New Hampshire
Hello,
I hope someone reads this list.
This error occured on an 686 platform while compiling the toolchain with
bootstrap-gcc_3.2 baseline
Is this problem solved by adding hash to the namespace or a build error
on our part?
/bin/sh ../libtool --mode=compile c++ -DHAVE_CONFIG_H -I.
-I/home/buildsys/sourc
e/toolchain/sid/component/bochs/vga -I.. -I../../../include
-I/home/buildsys/sou
rce/toolchain/sid/component/bochs/vga
-I/home/buildsys/source/toolchain/sid/comp
onent/bochs/vga/..
-I/home/buildsys/source/toolchain/sid/component/bochs/vga/../
../../include
-I/home/buildsys/source/toolchain/sid/component/bochs/vga/../cpu -
I/home/buildsys/source/toolchain/sid/component/bochs/vga/../../memory
-g -O2
-c
/home/buildsys/source/toolchain/sid/component/bochs/vga/sid-vga-wrapper.cc
c++ -DHAVE_CONFIG_H -I.
-I/home/buildsys/source/toolchain/sid/component/bochs/vg
a -I.. -I../../../include
-I/home/buildsys/source/toolchain/sid/component/bochs/
vga -I/home/buildsys/source/toolchain/sid/component/bochs/vga/..
-I/home/buildsy
s/source/toolchain/sid/component/bochs/vga/../../../include
-I/home/buildsys/sou
rce/toolchain/sid/component/bochs/vga/../cpu
-I/home/buildsys/source/toolchain/s
id/component/bochs/vga/../../memory -g -O2
-Wp,-MD,.deps/sid-vga-wrapper.pp -c /
home/buildsys/source/toolchain/sid/component/bochs/vga/sid-vga-wrapper.cc
-o sid
-vga-wrapper.o
In file included from
/home/buildsys/source/toolchain/sid/component/bochs/vga/si
d-vga-wrapper.h:15,
from
/home/buildsys/source/toolchain/sid/component/bochs/vga/si
d-vga-wrapper.cc:7:
/home/buildsys/source/toolchain/sid/include/sidattrutil.h: In member
function
`size_t sidutil::hash_string::operator()(const std::string&) const':
/home/buildsys/source/toolchain/sid/include/sidattrutil.h:696: `hash'
undeclared in namespace `std'
/home/buildsys/source/toolchain/sid/include/sidattrutil.h:696: parse
error
before `;' token
snips from sid/include/sidattrutil.h
689 #ifdef HAVE_HASHING
690 struct hash_string
691 {
692 size_t
693 operator () (const std::string& s) const
694 {
695 // XXX: improve?
696 return std::hash<const char*> () (s.c_str ());
697 }
698 };
699 #endif
the name space looks like this
namespace sidutil
{
// Make a string from an object by the default output-streaming
operator.
template <typename Type>
static std::string
make_attribute (const Type& value)
{
#if HAVE_SSTREAM
std::ostringstream stream;
stream << value;
return stream.str ();
#elif HAVE_STRSTREAM_H
ostrstream stream;
stream << value;
std::string result (stream.str (), stream.pcount ());
stream.freeze (0);
return result;
#else
#error "need <sstream> or <strstream.h>!"
#endif
}