This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
[ICE] g++-3.2.3 (fixed in 3.3(.2))
- From: Rene Rebe <rene dot rebe at gmx dot net>
- To: gcc at gcc dot gnu dot org
- Cc: ziegler at informatik dot hu-berlin dot de
- Date: Sun, 02 Nov 2003 12:44:28 +0100 (CET)
- Subject: [ICE] g++-3.2.3 (fixed in 3.3(.2))
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