public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* Re: libstdc++/9858: Extra virtual functions in ctype<char>
@ 2003-02-26 10:05 paolo
  0 siblings, 0 replies; 2+ messages in thread
From: paolo @ 2003-02-26 10:05 UTC (permalink / raw)
  To: gcc-bugs, gcc-prs, nobody, paolo, peturr02

Synopsis: Extra virtual functions in ctype<char>

Responsible-Changed-From-To: unassigned->paolo
Responsible-Changed-By: paolo
Responsible-Changed-When: Wed Feb 26 10:05:47 2003
Responsible-Changed-Why:
    Patching.
State-Changed-From-To: open->analyzed
State-Changed-By: paolo
State-Changed-When: Wed Feb 26 10:05:47 2003
State-Changed-Why:
    Confirmed. Easy to fix.

http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=9858


^ permalink raw reply	[flat|nested] 2+ messages in thread

* libstdc++/9858: Extra virtual functions in ctype<char>
@ 2003-02-26  9:06 peturr02
  0 siblings, 0 replies; 2+ messages in thread
From: peturr02 @ 2003-02-26  9:06 UTC (permalink / raw)
  To: gcc-gnats


>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@ru.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;
}


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2003-02-26 10:05 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-02-26 10:05 libstdc++/9858: Extra virtual functions in ctype<char> paolo
  -- strict thread matches above, loose matches on Subject: below --
2003-02-26  9:06 peturr02

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).