stdcxx-issues 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-295) [LWG #453] basic_stringbuf::seekoff need not always fail for an empty stream
Date Tue, 22 Apr 2008 03:33:21 GMT

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

Martin Sebor closed STDCXX-295.
-------------------------------


Regression test committed in [r650369|http://svn.apache.org/viewvc?rev=650369&view=rev]
and verified with gcc 4.1.2 on Fedora 8.

> [LWG #453] basic_stringbuf::seekoff need not always fail for an empty stream
> ----------------------------------------------------------------------------
>
>                 Key: STDCXX-295
>                 URL: https://issues.apache.org/jira/browse/STDCXX-295
>             Project: C++ Standard Library
>          Issue Type: Bug
>          Components: 27. Input/Output
>    Affects Versions: 4.1.2, 4.1.3
>         Environment: all
>            Reporter: Martin Sebor
>            Assignee: Martin Sebor
>             Fix For: 4.2.0
>
>
> According to DR 453, the program below should run successfully to completion:
> $ cat u.cpp && make u && ./u
> #include <cassert>
> #include <sstream>
> int main()
> {
>     std::istringstream in;
>     std::ostringstream out;
>     std::stringstream inout;
>     // DR453:
>     // http://www.open-std.org/jtc1/sc22/wg21/docs/lwg-defects.html#453
>     //
>     // changes 27.7.1.3, p10 (seekoff, called by tellg() and tellp())
>     // to read:
>     //
>     //     For a sequence to be positioned, if its next pointer (either
>     //     gptr() or pptr()) is a null pointer and the new offset newoff
>     //     is nonzero, the positioning operation fails.
>     assert (0 == in.tellg ());
>     assert (0 == out.tellp ());
>     assert (0 == inout.tellg ());
>     assert (0 == inout.tellp ());
> }
> 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/examples/include  -pedantic
-nostdinc++ -g  -W -Wall -Wcast-qual -Winline -Wshadow -Wwrite-strings -Wno-long-long  u.cpp
> gcc u.o -o u  -L/build/sebor/gcc-4.1.0-11s/lib -lstd11s  -lsupc++ -lm
> Assertion failed: 0 == in.tellg (), file u.cpp, line 20
> 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