public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/50510] transposed variable names in std::seed_seq::generate
  2011-09-24 22:35 [Bug libstdc++/50510] New: transposed variable names in std::seed_seq::generate john.salmon at deshaw dot com
@ 2011-09-24 22:35 ` paolo.carlini at oracle dot com
  2011-09-24 22:36 ` paolo at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-09-24 22:35 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2011-09-24
     Ever Confirmed|0                           |1

--- Comment #1 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-09-24 22:27:00 UTC ---
Ok, thanks.


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

* [Bug libstdc++/50510] New: transposed variable names in std::seed_seq::generate
@ 2011-09-24 22:35 john.salmon at deshaw dot com
  2011-09-24 22:35 ` [Bug libstdc++/50510] " paolo.carlini at oracle dot com
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: john.salmon at deshaw dot com @ 2011-09-24 22:35 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 50510
           Summary: transposed variable names in std::seed_seq::generate
    Classification: Unclassified
           Product: gcc
           Version: 4.6.1
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libstdc++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: john.salmon@deshaw.com


The C++11 "Final Draft International Standard" (FDIS n3290.pdf) fixes a defect
in the "Final Committee Draft" (FCD n3092.pdf), swapping the use of the
intermediate variables r3 and r4 in the std::seed_seq::generate() function. 
See 25.5.7.1 paragraph 8c.  This patch brings libstdc++ up-to-date:

salmonj@drdlogin0039.en.desres$ diff -u oldrandom.tcc random.tcc
--- oldrandom.tcc    2011-09-19 10:04:46.836512000 -0400
+++ random.tcc    2011-09-24 17:45:02.879621416 -0400
@@ -2796,8 +2796,8 @@
       _Type __r4 = __r3 - __k % __n;
       __r4 = __detail::__mod<_Type,
                __detail::_Shift<_Type, 32>::__value>(__r4);
-      __begin[(__k + __p) % __n] ^= __r4;
-      __begin[(__k + __q) % __n] ^= __r3;
+      __begin[(__k + __p) % __n] ^= __r3;
+      __begin[(__k + __q) % __n] ^= __r4;
       __begin[__k % __n] = __r4;
     }
     }
salmonj@drdlogin0039.en.desres$


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

* [Bug libstdc++/50510] transposed variable names in std::seed_seq::generate
  2011-09-24 22:35 [Bug libstdc++/50510] New: transposed variable names in std::seed_seq::generate john.salmon at deshaw dot com
  2011-09-24 22:35 ` [Bug libstdc++/50510] " paolo.carlini at oracle dot com
@ 2011-09-24 22:36 ` paolo at gcc dot gnu.org
  2011-09-24 22:44 ` paolo at gcc dot gnu.org
  2011-09-24 22:46 ` paolo.carlini at oracle dot com
  3 siblings, 0 replies; 5+ messages in thread
From: paolo at gcc dot gnu.org @ 2011-09-24 22:36 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> 2011-09-24 22:34:57 UTC ---
Author: paolo
Date: Sat Sep 24 22:34:50 2011
New Revision: 179149

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179149
Log:
2011-09-24  John Salmon  <john.salmon@deshaw.com>

    PR libstdc++/50510
    * include/bits/random.tcc (seed_seq::generate): Fix computation.

Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/include/bits/random.tcc


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

* [Bug libstdc++/50510] transposed variable names in std::seed_seq::generate
  2011-09-24 22:35 [Bug libstdc++/50510] New: transposed variable names in std::seed_seq::generate john.salmon at deshaw dot com
  2011-09-24 22:35 ` [Bug libstdc++/50510] " paolo.carlini at oracle dot com
  2011-09-24 22:36 ` paolo at gcc dot gnu.org
@ 2011-09-24 22:44 ` paolo at gcc dot gnu.org
  2011-09-24 22:46 ` paolo.carlini at oracle dot com
  3 siblings, 0 replies; 5+ messages in thread
From: paolo at gcc dot gnu.org @ 2011-09-24 22:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from paolo at gcc dot gnu.org <paolo at gcc dot gnu.org> 2011-09-24 22:35:11 UTC ---
Author: paolo
Date: Sat Sep 24 22:35:02 2011
New Revision: 179150

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=179150
Log:
2011-09-24  John Salmon  <john.salmon@deshaw.com>

    PR libstdc++/50510
    * include/bits/random.tcc (seed_seq::generate): Fix computation.

Modified:
    branches/gcc-4_6-branch/libstdc++-v3/ChangeLog
    branches/gcc-4_6-branch/libstdc++-v3/include/bits/random.tcc


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

* [Bug libstdc++/50510] transposed variable names in std::seed_seq::generate
  2011-09-24 22:35 [Bug libstdc++/50510] New: transposed variable names in std::seed_seq::generate john.salmon at deshaw dot com
                   ` (2 preceding siblings ...)
  2011-09-24 22:44 ` paolo at gcc dot gnu.org
@ 2011-09-24 22:46 ` paolo.carlini at oracle dot com
  3 siblings, 0 replies; 5+ messages in thread
From: paolo.carlini at oracle dot com @ 2011-09-24 22:46 UTC (permalink / raw)
  To: gcc-bugs

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

Paolo Carlini <paolo.carlini at oracle dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.6.2

--- Comment #4 from Paolo Carlini <paolo.carlini at oracle dot com> 2011-09-24 22:35:52 UTC ---
Done.


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

end of thread, other threads:[~2011-09-24 22:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-24 22:35 [Bug libstdc++/50510] New: transposed variable names in std::seed_seq::generate john.salmon at deshaw dot com
2011-09-24 22:35 ` [Bug libstdc++/50510] " paolo.carlini at oracle dot com
2011-09-24 22:36 ` paolo at gcc dot gnu.org
2011-09-24 22:44 ` paolo at gcc dot gnu.org
2011-09-24 22:46 ` 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).