This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: () operator crash
- To: oolon at ankh dot org, egcs-bugs at cygnus dot com
- Subject: Re: () operator crash
- From: "J.H.M. Dassen (Ray)" <jdassen at wi dot leidenuniv dot nl>
- Date: Mon, 14 Dec 1998 10:45:31 +0100
- Posted-To: gnu.g++.bug
- References: <199812131843.SAA03650@sunset.ankh.org>
[Courtesy copy of Usenet posting]
[Message quoted in full for the benefit of egcs-bugs@cygnus.com]
James Hawtin <oolon@ankh.org> wrote:
>When trying to access the () operator though the base class I came along a
>compiler crash or two.
>
>test2.cc and test3.cc illustrate this.
>
>James
>
>// test1.cc
>#include <iostream.h>
>
>class wobble
>{
>public:
> operator () (int dummy=1) { cout << "test" << endl; };
>};
>
>main()
>{
> // This works
> wobble()(1);
>}
>
>
>// test2.cc
>
>#include <iostream.h>
>
>class wobble
>{
>public:
> operator ()(int dummy=1) { cout << "test" << endl; };
>};
>
>main()
>{
> // compiler crashes here
> wobble()();
>}
>[Oolon in the sunset] c++ test2.cc
>test2.cc: In function `int main()':
>test2.cc:11: Internal compiler error.
>test2.cc:11: Please submit a full bug report to `bug-g++@prep.ai.mit.edu'.
>
>// test3.cc
>
>#include <iostream.h>
>
>class wobble
>{
>public:
> operator ()() { cout << "test" << endl; };
>};
>
>main()
>{
> // compiler crashes here
> wobble()();
>}
>
>[Oolon in the sunset] c++ test3.cc
>test3.cc: In function `int main()':
>test3.cc:11: Internal compiler error.
>test3.cc:11: Please submit a full bug report to `bug-g++@prep.ai.mit.edu'.
test2.cc and test3.cc also trigger internal compiler errors on EGCS 1.1.1
(Debian GNU/Linux on x86; g++ package v. 2.91.60-1).
Ray
--
POPULATION EXPLOSION Unique in human experience, an event which happened
yesterday but which everyone swears won't happen until tomorrow.
- The Hipcrime Vocab by Chad C. Mulligan