This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libstdc++/11740] ctype<wchar_t>::do_is(mask, wchar_t) doesn't handle multiple bits in mask.
- From: "peturr02 at ru dot is" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 6 Oct 2003 18:53:13 -0000
- Subject: [Bug libstdc++/11740] ctype<wchar_t>::do_is(mask, wchar_t) doesn't handle multiple bits in mask.
- References: <20030731090421.11740.peturr02@ru.is>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11740
------- Additional Comments From peturr02 at ru dot is 2003-10-06 18:53 -------
Paolo Carlini wrote:
> Pétur, could you please detail a little more your reading? In 22.2.1.1.2
> I don't see any "any" ;), only an "&" in p2...
This is the relevant text:
> Returns: The first form returns the result of the expression
> (M & m) != 0; i.e., true if the character has the characteristics
> specified. The second form returns high.
(M & m) != 0 is true if any bit is set in both M and m. This is
also consistent with the specialization for char.
The current implementation returns true if (M & m) == m && m != 0.
The sentence "true if the character has the characteristics specified"
implies the current implementation. I suspect that it should read
"true if the character has any of the characteristics specified".