This is the mail archive of the
libstdc++@sources.redhat.com
mailing list for the libstdc++ project.
Re: request suggestions/proofread for DR
- To: stdc++ <libstdc++ at sourceware dot cygnus dot com>
- Subject: Re: request suggestions/proofread for DR
- From: Dietmar Kuehl <dietmar_kuehl at yahoo dot com>
- Date: Wed, 12 Jul 2000 02:56:26 -0700 (PDT)
Hi,
--- brent verner <brent@rcfile.org> schrieb:
> I propose the following addition to clarify this situation.
>
> Location:
>
> 22.2.2.1.2 num_get virtual functions
> 11 Stage 3: The result of stage 2 processing can be one of
>
> Addition:
>
> Stage 2 was unable to successfully accumulate and convert
> any chars to type val. ios_base::failbit is assigned to err.
>
> */
Currently the standard says in 22.2.2.1.2 paragraph 11 second bullet:
The sequence of chars accumulated in stage 2 would have caused
scanf to report an input failure. ios_base::failbit
is assigned to err.
Track it down and you will see that 'failbit' is set if no characters
where accumlated in stage 2. I'm not saying that the standard is
reasonably clear about this: Actually it is not. However, the standard
is consistent and correct and even says exactly what it wants to say
(at least with respect to this issue; there is an issue with numeric
overflow and error reporting in C++). Thus, if you would submit this as
a defect report, the answer of the LWG would be: Not a defect! It is
not the goal of standard to be clear. The goal is to precisely describe
something to produce predictable behavior. It would be cool if this
would be done in a form easily understandable but I don't think that
clarifications qualify as defects...
=====
<mailto:dietmar_kuehl@yahoo.com>
<http://www.dietmar-kuehl.de/>
__________________________________________________
Do You Yahoo!?
Get Yahoo! Mail – Free email you can access from anywhere!
http://mail.yahoo.com/