[ICE] g++-3.2.3 (fixed in 3.3(.2))
Rene Rebe
rene.rebe@gmx.net
Sun Nov 2 11:44:00 GMT 2003
Hi,
yet another case of an ICE in g++, this time version 3.2.3 - the bug
is fixed in gcc-3.3(.2) - I do not know if a back-port is appropriated
... (all self-build, PowerPC, ROCK Linux):
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
class Obj
{
public:
void Foo ();
};
namespace N
{
template <typename T>
class SomeFunctor
{
public:
void operator () (T& t) {t -> Foo ();}
};
}
int main ()
{
vector<Obj*> v;
vector<Obj*>::iterator begin = v.begin ();
vector<Obj*>::iterator end = v.end ();
// syntactical error crashes g++ (3.2.x):
for_each (begin, end, N::SomeFunctor);
// should be :
// for_each (begin, end, N::SomeFunctor <Obj*> () );
}
rene@idefix:~/develop/gsmp-trunk/utility/tests$ g++ smashgcc.cc
smashgcc.cc: In function `int main()':
smashgcc.cc:56: internal error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
rene@idefix:~/develop/gsmp-trunk/utility/tests$ g++-33 smashgcc.cc
smashgcc.cc: In function `int main()':
smashgcc.cc:56: error: invalid use of template `template<class T> class
N::SomeFunctor'
Sincerely yours,
René Rebe
- ROCK Linux stable release maintainer
--
René Rebe - Europe/Germany/Berlin
rene@rocklinux.org rene@rocklinux-consulting.de
http://www.rocklinux.org http://www.rocklinux-consulting.de
http://gsmp.tfh-berlin.de/gsmp http://gsmp.tfh-berlin.de/rene
More information about the Gcc
mailing list