This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC 3.0.3 PRs
- From: Philip Martin <philip at codematters dot co dot uk>
- To: Joe Buck <jbuck at synopsys dot com>
- Cc: bkoz at redhat dot com (Benjamin Kosnik), mark at codesourcery dot com (Mark Mitchell), gcc at gcc dot gnu dot org (gcc at gcc dot gnu dot org), toon at moene dot indiv dot nluug dot nl (toon at moene dot indiv dot nluug dot nl)
- Date: 10 Dec 2001 19:37:01 +0000
- Subject: Re: GCC 3.0.3 PRs
- Envelope-to: gcc@gcc.gnu.org
- References: <200112101926.LAA17358@atrus.synopsys.com>
Joe Buck <jbuck@synopsys.COM> writes:
> The audit trail for 3720 already has a claim of a bug report:
>
> > 3. Trying the code, input of std::numeric_limits<T>::max() in octal or
> > hex doesn't appear to work for integers, e.g. reading 017777777777
> > into a long on x86 doesn't work, it appears to accept one character
> > too few. Decimal works.
>
> You wrote:
>
> > Not quite sure what you mean here, can you provide this problem
> > statement in C++ please.
>
> He's saying that trying to read 017777777777 into a long does not work.
> Seems clear to me ... but someone else (Paolo?) said that he couldn't
> duplicate the report. I will try it myself after lunch today.
Don't bother, I raised the "bug report", but I also wrote in
http://gcc.gnu.org/ml/gcc-bugs/2001-12/msg00332.html
Using an explicit manipulator
i >> std::setbase(0) >> x;
or
i >> std::oct >> x;
causes the number to be read correctly. I suppose it's table 89 in
27.4.4.1 that determines that dec is the default? I didn't expect
that.
As I said, I wasn't expecting dec to be the default, but it looks like
it conforms to the standard.
Philip