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: internal compiler error (1.1.1)


>>>>> "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.




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