public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/50268] New: [C++0x] bitset doesn't sanitize input
@ 2011-09-01 19:20 marc.glisse at normalesup dot org
  2011-09-01 19:23 ` [Bug libstdc++/50268] " paolo.carlini at oracle dot com
                   ` (19 more replies)
  0 siblings, 20 replies; 21+ messages in thread
From: marc.glisse at normalesup dot org @ 2011-09-01 19:20 UTC (permalink / raw)
  To: gcc-bugs

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=50268

             Bug #: 50268
           Summary: [C++0x] bitset doesn't sanitize input
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: marc.glisse@normalesup.org


#include <bitset>
#include <iostream>
int main(){
        std::bitset<1> b(3);
        std::cout << b.count() << std::endl;
}

Prints 1 with -std=c++98 and 2 with -std=c++0x.

(I noticed it while wondering why _M_are_all_aux uses popcount, which isn't
optimal)


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

end of thread, other threads:[~2011-09-02 13:41 UTC | newest]

Thread overview: 21+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-01 19:20 [Bug libstdc++/50268] New: [C++0x] bitset doesn't sanitize input marc.glisse at normalesup dot org
2011-09-01 19:23 ` [Bug libstdc++/50268] " paolo.carlini at oracle dot com
2011-09-01 19:29 ` paolo.carlini at oracle dot com
2011-09-01 19:41 ` paolo.carlini at oracle dot com
2011-09-01 22:17 ` paolo.carlini at oracle dot com
2011-09-01 22:55 ` paolo.carlini at oracle dot com
2011-09-02  1:35 ` paolo.carlini at oracle dot com
2011-09-02  8:03 ` marc.glisse at normalesup dot org
2011-09-02  9:38 ` paolo.carlini at oracle dot com
2011-09-02  9:41 ` paolo.carlini at oracle dot com
2011-09-02 10:29 ` paolo at gcc dot gnu.org
2011-09-02 10:37 ` paolo.carlini at oracle dot com
2011-09-02 10:42 ` paolo.carlini at oracle dot com
2011-09-02 11:00 ` marc.glisse at normalesup dot org
2011-09-02 12:08 ` paolo.carlini at oracle dot com
2011-09-02 12:24 ` marc.glisse at normalesup dot org
2011-09-02 12:34 ` paolo.carlini at oracle dot com
2011-09-02 13:17 ` paolo.carlini at oracle dot com
2011-09-02 13:26 ` marc.glisse at normalesup dot org
2011-09-02 13:40 ` paolo at gcc dot gnu.org
2011-09-02 13:41 ` paolo.carlini at oracle dot com

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).