c++/6716: g++ loops itself and fill ram during compiling

ldelana@libero.it ldelana@libero.it
Sat May 18 05:26:00 GMT 2002


>Number:         6716
>Category:       c++
>Synopsis:       loop and fill ram during compiling
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          wrong-code
>Submitter-Id:   net
>Arrival-Date:   Sat May 18 05:26:01 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Lorenzo Delana
>Release:        3.1 20020508 (prerelease)
>Organization:
none
>Environment:
System: Linux alpha 2.4.18 #1 Thu May 16 08:34:19 CEST 2002 i686 unknown
Architecture: i686

	AMDK7(1.1Ghz), Linux-2.4.18+cryptoapi, athlon, glibc-{linuxthreads}-2.2.5
host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc-3.1-20020508/configure --prefix=/usr/gcc-3.1 --enable-shared --enable-languages=c,c++,objc --enable-threads : (reconfigured) ../gcc-3.1-20020508/configure --with-gcc-version-trigger=/usr/src/gcc-3.1-20020508/gcc/version.c --host=i686-pc-linux-gnu --prefix=/usr/gcc-3.1 --enable-shared --enable-languages=c,c++,objc,f77 --enable-threads
>Description:
	try with g++ -c on this simple wrong code:
// --- cut here --
#include <iostream>
#include <set>
using namespace std;

template<class T>
class X
{
  
public:
  X() {}
  virtual ~X() { }
  
  bool operator()( T*, T* ) const { return true; }

protected:
  T* x;
  set< X<T>*, X<T> > aset; // <-- THIS IS THE WRONG CODE X<T> for less-than op
  
};

class Y : public X<int>
{
public:

};
// --- cut here --

>How-To-Repeat:
  g++ -c <code.cxx>
>Fix:
  check why loop on set STL _Compare using class itself for less-than op

>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-bugs mailing list