public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* ERROR Using Named Return Values in C++
@ 1999-04-30 23:15 Achim Hummel
  0 siblings, 0 replies; only message in thread
From: Achim Hummel @ 1999-04-30 23:15 UTC (permalink / raw)
  To: egcs-bugs

Hi,

I tried to using "named return values" together with templates
(extension to c++ language)
similar to the gcc user manual,  but the compiler crashed with a
internal compiler error in
the function expand_expr. Without templates everything works fine !

Is this a real error or just a wrong utilization of the code by myself?
If Yes, is (or will) there
be a workaround for that error ?

Thanks in advance,

    Achim

--------------------------------------------------------------
Here the additional stuff:
--------------------------------------------------------------
Reading specs from
/usr/local/egcs/lib/gcc-lib/i686-pc-linux-gnulibc1/egcs-2.91.66/specs
gcc version egcs-2.91.66 19990314 (egcs-1.1.2 release)
 /usr/local/egcs/lib/gcc-lib/i686-pc-linux-gnulibc1/egcs-2.91.66/cpp
-lang-c++ -v -undef -D__GNUC__=2 -D__GNUG__=2 -D__cplusplus
-D__GNUC_MINOR__=91 -D__ELF__ -Dunix -Di386 -D__i386__ -Dlinux -D__ELF__
-D__unix__ -D__i386__ -D__i386__ -D__linux__ -D__unix -D__i386 -D__linux
-Asystem(posix) -D__EXCEPTIONS -Asystem(unix) -Acpu(i386)
-Amachine(i386) -Di386 -D__i386 -D__i386__ -Di686 -Dpentiumpro -D__i686
-D__i686__ -D__pentiumpro -D__pentiumpro__ bug.cc bug.ii
GNU CPP version egcs-2.91.66 19990314 (egcs-1.1.2 release) (i386
Linux/ELF)
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/egcs/include/g++
 /usr/local/include
 /usr/local/egcs/i686-pc-linux-gnulibc1/include
 /usr/local/egcs/lib/gcc-lib/i686-pc-linux-gnulibc1/egcs-2.91.66/include

 /usr/include
End of search list.
 /usr/local/egcs/lib/gcc-lib/i686-pc-linux-gnulibc1/egcs-2.91.66/cc1plus
bug.ii -quiet -dumpbase bug.cc -version -o bug.s
GNU C++ version egcs-2.91.66 19990314 (egcs-1.1.2 release)
(i686-pc-linux-gnulibc1) compiled by GNU C version egcs-2.91.66 19990314
(egcs-1.1.2 release).
expr.c:5450: Internal compiler error in function expand_expr

---------------------------------------------------------------
programm data:
---------------------------------------------------------------

template<class T>
class A {

  public:
    int method();
};

template<class T> int
A<T>::method()  return a;
{
    a = 3;
}

int
main()
{
    A<int> a;

    a.method();
}


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1999-04-30 23:15 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-04-30 23:15 ERROR Using Named Return Values in C++ Achim Hummel

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).