incubator-stdcxx-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Farid Zaripov (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (STDCXX-259) std::ostream::operator<<(int) fails to call width(0) on exception
Date Tue, 09 Oct 2007 12:41:50 GMT

     [ 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.


Mime
View raw message