[RFC] Libstdc++/13858 vs enc_filebuf/.../13189.cc
Paolo Carlini
pcarlini@suse.de
Mon Feb 16 17:04:00 GMT 2004
Hi everyone, hi Benjamin,
it looks like my fix for libstdc++/13858 exposed latent problems
in enc_filebuf which we didn't notice 'til now.
The concerned testcases do:
try
{
state_type st;
filebuf_type fbuf(st);
locale loc(locale::classic(), new enc_codecvt);
fbuf.pubimbue(loc);
fbuf.open("tmp_13189c", mode);
fbuf.sputc('a');
fbuf.pubseekoff(0, ios_base::beg);
fbuf.sgetc();
fbuf.close();
}
catch(...)
{
VERIFY( false );
}
and now that overflow throws in case of conversion errors the
catch block is reached.
Of course, overflow was already failing before my patch, just we
couldn't possibly notice that.
I'm not sure what we want to do, since enc_filebuf is not really
supposed to be functional and 13189, actually, was only about
*compilation* errors...
Shall I just remove for now the VERIFY in the catch block?
Paolo.
More information about the Libstdc++
mailing list