Article View: gnu.g++.bug
Article #793g++ 2.2.2 template bug
From: Steve Rumsby
Date: Thu, 13 Aug 1992 18:06
Date: Thu, 13 Aug 1992 18:06
33 lines
1708 bytes
1708 bytes
cc1plus seems to get upset when it can't instantiate an appropriate version
of a template function to match a given call. This happens on Sun 3 and
Sun 4 machines running SunOS 4.1.1, and on an SGI Indigo running Irix 4.0.1.
See the attatched example to reproduce the problem. Any suggestions?
Thanks,
Steve.
$ cat x.c
template <class T>
void
g(T x)
{
}
void
f()
{
g(); // There is no g() for this call to match
// so cc1plus goes gaga...
}
$ g++ -v -c x.c
Reading specs from /gnu/lib/gcc-lib/sparc-sunos4/2.2.2/specs
gcc version 2.2.2
/gnu/lib/gcc-lib/sparc-sunos4/2.2.2/cpp -lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus -Dsparc -Dsun -Dunix -D__sparc__ -D__sun__ -D__unix__ -D__sparc -D__sun -D__unix x.c /usr/tmp/cca19409.i
GNU CPP version 2.2.2 (sparc)
/gnu/lib/gcc-lib/sparc-sunos4/2.2.2/cc1plus /usr/tmp/cca19409.i -quiet -dumpbase x.cc -version -o /usr/tmp/cca19409.s
GNU C++ version 2.2.2 (sparc) compiled by GNU C version 2.2.2.
/gnu/bin/gcc: Internal compiler error: program cc1plus got fatal signal 11
--
UUCP: ...!uknet!warwick!steve Internet: steve@maths.warwick.ac.uk
JANET: steve@uk.ac.warwick.maths PHONE: +44 203 524657
Technical Details
Message-ID:
<10474.199208131606@amazon.maths.warwick.ac.uk>Path:
arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!ames!elroy.jpl.nasa.gov!usc!wupost!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!maths.warwick.ac.UK!steveShow Full Headers
Complete Article Headers
Newsgroups: gnu.g++.bug Path: arc1-ca.pugleaf.net!sparky!uunet!stanford.edu!ames!elroy.jpl.nasa.gov!usc!wupost!zaphod.mps.ohio-state.edu!cis.ohio-state.edu!maths.warwick.ac.UK!steve From: steve@maths.warwick.ac.UK (Steve Rumsby) Subject: g++ 2.2.2 template bug Message-ID: <10474.199208131606@amazon.maths.warwick.ac.uk> Sender: gnulists@ai.mit.edu Organization: Maths Institute, Warwick University, Coventry, UK. Distribution: gnu Date: Thu, 13 Aug 1992 18:06:47 GMT Approved: bug-g++@prep.ai.mit.edu Lines: 34