This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
Re: libstdc++/8231: iostream header position causes bad code generation
- From: ljrittle at gcc dot gnu dot org
- To: brister at pobox dot com, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, ljrittle at gcc dot gnu dot org
- Date: 4 Nov 2002 22:32:22 -0000
- Subject: Re: libstdc++/8231: iostream header position causes bad code generation
- Reply-to: ljrittle at gcc dot gnu dot org, brister at pobox dot com, gcc-bugs at gcc dot gnu dot org, gcc-prs at gcc dot gnu dot org, ljrittle at gcc dot gnu dot org, gcc-gnats at gcc dot gnu dot org
Synopsis: iostream header position causes bad code generation
State-Changed-From-To: analyzed->closed
State-Changed-By: ljrittle
State-Changed-When: Mon Nov 4 14:32:21 2002
State-Changed-Why:
Paolo,
if the include of <iostream> is not in position #1, then
#include <iosfwd>
must appear there, no?
It is not legal to move the include of <iostream> out of
position #1 in any other case. In any event, with your
example, it is not OK to move the include of <iostream>
past position #3. Doing so is lying to the compiler.
As TC++PL-SE says it, <iosfwd> is sufficient to refer
to all things declared in <iostream> but not to apply
operations to them.
Not a regression but rather a more agressive use of the properties of the standard (in case this worked with libstdc++-v2).
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8231