This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Quick test..
- To: Linux-Egcs <egcs at cygnus dot com>
- Subject: Quick test..
- From: Alex Buell <alex dot buell at tahallah dot demon dot co dot uk>
- Date: Thu, 3 Sep 1998 12:56:45 -0400 (EDT)
- cc: alex dot buell at tahallah dot demon dot co dot uk
Hi, someone posted the following code earlier (since like a twit, I
deleted it, can't follow up on it!)
#include <memory>
#include <cstdlib>
#include <iostream>
template <int i = 20> char *
xx (const auto_ptr<char> &c = auto_ptr<char>(new char[i]))
{
return strncpy (c.get (), "Hello World!", i);
}
int
main ()
{
cout << xx () << endl;
}
This doesn't cause a sig-11 error like the guy reported for his v1.03a
egcs compiler. Rather, it comes up with the following error:
test.c:7: parse error before `&'
test.c: In function `int main()':
test.c:15: incomplete type unification
test.c:15: no matching function for call to `xx ()'
test.c:16: confused by earlier errors, bailing out
No sig-11 error there, so obviously the guy who reported this needs to
check his hardware out.
Cheers,
Alex.
---
/\_/\ Legalise cannabis now!
( o.o ) Grow some cannabis today!
> ^ < Peace, Love, Unity and Respect to all.
Check out http://www.tahallah.demon.co.uk