You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@stdcxx.apache.org by "Martin Sebor (JIRA)" <ji...@apache.org> on 2006/07/11 21:38:31 UTC
[jira] Created: (STDCXX-259) std::ostream::operator<<(int) fails to
call width(0) on exception
std::ostream::operator<<(int) fails to call width(0) on exception
-----------------------------------------------------------------
Key: STDCXX-259
URL: http://issues.apache.org/jira/browse/STDCXX-259
Project: C++ Standard Library
Type: Bug
Components: 27. Input/Output
Versions: 4.1.2, 4.1.3
Environment: all
Reporter: Martin Sebor
Assigned to: Martin Sebor
lib.facet.num.put.virtuals, p5, Stage 3 is specified to end by the facet calling width(0) before outputting any characters using the facet's iterator. The program below shows that stdcxx fails to do so:
$ cat t.cpp && nice gmake t && ./t
#include <cassert>
#include <ostream>
#include <streambuf>
int main ()
{
struct: std::streambuf {
int_type overflow (int_type) {
return throw this, traits_type::eof ();
}
} buf;
std::ostream out (&buf);
out.width (2);
try {
out << 1;
}
catch (...) { }
assert (0 == out.width ());
}
aCC -c -I/nfs/devco/sebor/dev/stdlib/include/ansi -I/usr/include -D_RWSTDDEBUG -D_RWSTD_USE_CONFIG -I/nfs/devco/sebor/dev/stdlib/include -I/build/sebor/aCC-3.27-11s/include -I/nfs/devco/sebor/dev/stdlib/examples/include -Aa +nostl -g +d +w +W392 +W655 +W684 +W818 +W819 +W849 +W229 +W361 t.cpp
aCC t.o -o t -Aa +nostl -Wl,+s -Wl,+vnocompatwarnings -L/build/sebor/aCC-3.27-11s/lib -L/build/sebor/aCC-3.27-11s/lib -lstd11s -lm
Assertion failed: 0 == out.width (), file t.cpp, line 20
ABORT instruction (core dumped)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Resolved: (STDCXX-259) std::ostream::operator<<(int) fails
to call width(0) on exception
Posted by "Farid Zaripov (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/STDCXX-259?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Farid Zaripov resolved STDCXX-259.
----------------------------------
Resolution: Fixed
Fix Version/s: 4.2
The issue resolved thus: http://svn.apache.org/viewcvs?view=rev&rev=420970
> std::ostream::operator<<(int) fails to call width(0) on exception
> -----------------------------------------------------------------
>
> Key: STDCXX-259
> URL: https://issues.apache.org/jira/browse/STDCXX-259
> 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
>
>
> lib.facet.num.put.virtuals, p5, Stage 3 is specified to end by the facet calling width(0) before outputting any characters using the facet's iterator. The program below shows that stdcxx fails to do so:
> $ cat t.cpp && nice gmake t && ./t
> #include <cassert>
> #include <ostream>
> #include <streambuf>
> int main ()
> {
> struct: std::streambuf {
> int_type overflow (int_type) {
> return throw this, traits_type::eof ();
> }
> } buf;
> std::ostream out (&buf);
> out.width (2);
> try {
> out << 1;
> }
> catch (...) { }
> assert (0 == out.width ());
> }
> aCC -c -I/nfs/devco/sebor/dev/stdlib/include/ansi -I/usr/include -D_RWSTDDEBUG -D_RWSTD_USE_CONFIG -I/nfs/devco/sebor/dev/stdlib/include -I/build/sebor/aCC-3.27-11s/include -I/nfs/devco/sebor/dev/stdlib/examples/include -Aa +nostl -g +d +w +W392 +W655 +W684 +W818 +W819 +W849 +W229 +W361 t.cpp
> aCC t.o -o t -Aa +nostl -Wl,+s -Wl,+vnocompatwarnings -L/build/sebor/aCC-3.27-11s/lib -L/build/sebor/aCC-3.27-11s/lib -lstd11s -lm
> Assertion failed: 0 == out.width (), file t.cpp, line 20
> ABORT instruction (core dumped)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.