egcs-1.0.1: bug handling struct in functions?

Mark Mitchell mmitchell@usa.net
Tue Feb 10 14:45:00 GMT 1998


>>>>> "Andy" == Andy Tai <atai@ece.ucsd.edu> writes:

    Andy> The following program causes both gcc 2.8 anf gcc
    Andy> egcs-2.90.23 980102 (egcs-1.0.1 release) to declare
    Andy> "internal compiler error".  gcc 2.7.2.2 compiles it fine.

As do more recent egcs snapshots.

    Andy> ---bug2.cc--- template< class T > void sort( T* t, int n ) {
    Andy> struct { int operator()(T i, T j) { return (i < j) ? -1 :
    Andy> ((j < i) ? 1 : 0) ; } } c ; sort(t, n, c, 0) ; } ----end of
    Andy> bug2.cc--

-- 
Mark Mitchell		mmitchell@usa.net
Stanford University	http://www.stanford.edu




More information about the Gcc-bugs mailing list