[
https://issues.apache.org/jira/browse/STDCXX-329?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Martin Sebor reassigned STDCXX-329:
-----------------------------------
Assignee: Martin Sebor
> 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
>
> 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.