This is the mail archive of the gcc-patches@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: eb125


Martin von Loewis <martin@mira.isdn.cs.tu-berlin.de> writes:

>> > ! template void test<> (test_box *);     // ERROR - illegal code

>> Actually, this is perfectly legal code, it is an explicit
>> instantiation

> The comment in for the ERROR could have been clearer. This is exactly
> the illegal code I'm talking about:

But the explicit instantiation is *not* illegal, only the template
declaration following the class declaration is.  If egcs is ever
improved so that it recovers from the lack of the semicolon and
accepts the template function declaration, it would not print an error
message there.  In fact, I think it *should* be improved in that
direction, so I'd rather classify that error message as an expected
failure of egcs, not as actual error in the code.

> [iostream.h included]

> This would be a reasonable solution for normal test cases. For these
> cases extracted from egcs-bugs, I use the policy to not modify the
> source code (except when the change clearly is not affecting the
> problem of the original poster).

It doesn't.  Removing all the iostream garbage and the definition of
test_box::print does not affect the ICE9 produced by egcs 1.0.3a on
sparc-sun-solaris2.6 for this code.

-- 
Alexandre Oliva
mailto:oliva@dcc.unicamp.br mailto:aoliva@acm.org
http://www.dcc.unicamp.br/~oliva
Universidade Estadual de Campinas, SP, Brasil



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