This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: c++/9120: [3.4 regression] iostream 'forgotten' if included after template definition
- From: bangerth at dealii dot org
- To: gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, stefaandr at hotmail dot com
- Date: 6 Jan 2003 22:55:44 -0000
- Subject: Re: c++/9120: [3.4 regression] iostream 'forgotten' if included after template definition
- Reply-to: bangerth at dealii dot org, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, nobody at gcc dot gnu dot org, stefaandr at hotmail dot com, gcc-gnats at gcc dot gnu dot org
Old Synopsis: iostream 'forgotten' if included after template definition
New Synopsis: [3.4 regression] iostream 'forgotten' if included after template definition
State-Changed-From-To: open->analyzed
State-Changed-By: bangerth
State-Changed-When: Mon Jan 6 14:55:43 2003
State-Changed-Why:
Indeed. This is a regression on the main branch, it works with
a snapshot of 3.3 right before the branch occured. I have
no idea what this could be.
In a debugger one can see that the function is actually
called, but nothing happens in it and one cannot go
further into the calls to op<< or such. This, of course,
is due to the fact that the assembler output for this
function looks like so:
.type p<int>::a(), @function p<int>::a():
pushl %ebp
movl %esp, %ebp
popl %ebp
ret
If one adds other statements to the function, for example
the line
int i = 1234;
then one gets assembler output for them, so _something_ is
happening. But the line with std::cerr is not compiled.
Very strange, indeed.
Note that the program should not compile in the first
place, but does only since gcc does not implement two-stage
name lookup.
W.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9120