This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: internal compiler error (1.1.1)
- To: Gabriel Dos Reis <Gabriel dot Dos-Reis at dptmaths dot ens-cachan dot fr>
- Subject: Re: internal compiler error (1.1.1)
- From: nbecker at fred dot net
- Date: 28 Jan 1999 08:08:36 -0500
- Cc: egcs-bugs at cygnus dot com
- References: <E105avT-0007su-00@hns.com> <v8vzp74mjpj.fsf@piano.dptmaths.ens-cachan.fr>
>>>>> "Gabriel" == Gabriel Dos Reis <Gabriel.Dos-Reis@dptmaths.ens-cachan.fr> writes:
>>>>> «NB», <nbecker@fred.net> wrote:
NB> egcs-1.1.1 i686-pc-linux-gnu
NB> g++ -o bug3 bug3.cc -g
NB> bug3.cc: In function `int main()':
NB> bug3.cc:23: Internal compiler error.
NB> bug3.cc:23: Please submit a full bug report to `egcs-bugs@cygnus.com'.
NB> ----bug3.cc----
NB> #include <iostream.h>
NB> #include <algo.h>
NB> template <class InputIterator, class OutputIterator, class UnaryOperation>
NB> template <class InputIterator, class Function>
NB> Function myfor_each(InputIterator first, InputIterator last, Function& f) {
NB> for ( ; first != last; ++first)
NB> f(*first);
NB> return f;
NB> }
Gabriel> This code is illegal.
Yes, I know it was a typo - but it shouldn't crash the compiler.