C++ wrapper iostream input bug

Marc Glisse marc.glisse at inria.fr
Mon Apr 19 12:30:35 CEST 2010


On Mon, 22 Mar 2010, Helmut Jarausch wrote:

> The 'operator>>' in the C++ wrapper library fails if the input
> is not terminated by white space - see the example.
> This doesn't fail for the input operator in general, just for
> gmpxx.

Hello,

let me check whether I understand how it works.

1) when the exception mask is clear, gmp works fine (actually there is a 
bug that makes it clear the eof flag too eagerly, but let's ignore that 
for now)

2) it may happen that the fail flag is temporarily set and then cleared 
during the execution of the function.

==> Things would work as you expect if for such functions gmp saved the 
exception mask, cleared it, executed the current code and finally restored 
the mask.

-- 
Marc Glisse


More information about the gmp-bugs mailing list