This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: () operator crash


[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 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]