This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: GCC 3.0.3 PRs


I wrote:
> > 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.

Right. There's nothing that says that iostreams are supposed to work like
the C/C++ lexical analyzer, treating a leading zero as a directive to read
in octal.  I'd assumed that you were reporting based on setting the
state to octal.

Ben, sorry about that.

Joe


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]