libstdc++/1893: References to ios_base::iostate not qualified in istream.tcc

bumgard@roguewave.com bumgard@roguewave.com
Tue Feb 6 15:56:00 GMT 2001


>Number:         1893
>Category:       libstdc++
>Synopsis:       References to ios_base::iostate not qualified in istream.tcc
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Feb 06 15:56:00 PST 2001
>Closed-Date:
>Last-Modified:
>Originator:     Greg Bumgardner
>Release:        2.97 (as of 2001-02-06)
>Organization:
>Environment:
N/A
>Description:
There are several unqualified references to the 
ios_base::iostate class in some of the basic_istream<> 
methods located in bits/istream.tcc.

Since the definition of this typedef is separated from
ios_base by the basic_ios<> template class, it must be
qualified using the ios_base class name.
>How-To-Repeat:
Instantiate the basic_istream<> class.

I detected the problem when I compiled with -fno-inline
and -fno-default-inline.  The compiler failed to complain
on compiles without these options.
>Fix:
Fix all occurances of this line in bits/istream.tcc:

  iostate __err = iostate(ios_base::goodbit); // WRONG

to read:

  ios_base::iostate __err = ios_base::iostate(ios_base::goodbit);

>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the Gcc-bugs mailing list