stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Martin Sebor (JIRA)" <j...@apache.org>
Subject [jira] Closed: (STDCXX-329) std::istream::sentry ctor affects gcount()
Date Tue, 06 Feb 2007 02:30:05 GMT

     [ https://issues.apache.org/jira/browse/STDCXX-329?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Martin Sebor closed STDCXX-329.
-------------------------------

       Resolution: Fixed
    Fix Version/s: 4.2

Fixed by the referenced patch.

> std::istream::sentry ctor affects gcount()
> ------------------------------------------
>
>                 Key: STDCXX-329
>                 URL: https://issues.apache.org/jira/browse/STDCXX-329
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: 27. Input/Output
>    Affects Versions: 4.1.3, 4.1.2
>         Environment: all
>            Reporter: Martin Sebor
>         Assigned To: Martin Sebor
>             Fix For: 4.2
>
>
> The istream::sentry ctor is not supposed to change gcount(). Ours does.
> $ cat z.cpp && make z && ./z
> #include <cassert>
> #include <sstream>
> int main ()
> {
>     std::istringstream strm (" ");
>     const std::istream::sentry sentry (strm);
>     assert ((strm.eofbit | strm.failbit) == strm.rdstate ());
>     assert (0 == strm.gcount ());
> }
> gcc -c -I/build/sebor/dev/stdlib/include/ansi -D_RWSTDDEBUG    -D_RWSTD_USE_CONFIG -I/build/sebor/dev/stdlib/include
-I/build/sebor/gcc-4.1.0-11s/include -I/build/sebor/dev/stdlib/../rwtest -I/build/sebor/dev/stdlib/../rwtest/include
-I/build/sebor/dev/stdlib/tests/include  -pedantic -nostdinc++ -g  -W -Wall -Wcast-qual -Winline
-Wshadow -Wwrite-strings -Wno-long-long   z.cpp
> gcc z.o -o z -L/build/sebor/gcc-4.1.0-11s/rwtest -lrwtest11s  -L/build/sebor/gcc-4.1.0-11s/lib
-lstd11s  -lsupc++ -lm 
> Assertion failed: 0 == strm.gcount (), file z.cpp, line 9
> Abort (core dumped)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message