This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
[RFC] Libstdc++/13858 vs enc_filebuf/.../13189.cc
- From: Paolo Carlini <pcarlini at suse dot de>
- To: libstdc++ <libstdc++ at gcc dot gnu dot org>
- Cc: Benjamin Kosnik <bkoz at redhat dot com>
- Date: Mon, 16 Feb 2004 18:04:31 +0100
- Subject: [RFC] Libstdc++/13858 vs enc_filebuf/.../13189.cc
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.