This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
libstdc++/9858: Extra virtual functions in ctype<char>
- From: peturr02 at ru dot is
- To: gcc-gnats at gcc dot gnu dot org
- Date: 26 Feb 2003 08:57:36 -0000
- Subject: libstdc++/9858: Extra virtual functions in ctype<char>
- Reply-to: peturr02 at ru dot is
>Number: 9858
>Category: libstdc++
>Synopsis: Extra virtual functions in ctype<char>
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Feb 26 09:06:01 UTC 2003
>Closed-Date:
>Last-Modified:
>Originator: peturr02 at ru dot is
>Release: gcc-3.2.1
>Organization:
>Environment:
Red Hat Linux 8.0
>Description:
ctype<char> has some non-standard virtual functions, for example bool do_is(mask, char).
>How-To-Repeat:
See attachment.
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
----gnatsweb-attachment----
Content-Type: text/plain; name="ctypebug2.cc"
Content-Disposition: inline; filename="ctypebug2.cc"
#include <locale>
#undef NDEBUG
#include <cassert>
bool called = false;
class Derived : public std::ctype<char>
{
public:
bool do_is(mask, char_type) const { }
};
class Derived2 : public Derived
{
public:
bool do_is(mask, char_type) const { called = true; }
};
int main()
{
Derived2 d2;
const Derived& dr = d2;
called = false;
dr.do_is(std::ctype_base::space, 'a');
assert(!called);
return 0;
}