libstdc++/8231: iostream header position causes bad code generation

ljrittle@gcc.gnu.org ljrittle@gcc.gnu.org
Mon Nov 4 14:32:00 GMT 2002


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



More information about the Gcc-bugs mailing list