Hi Folks!

Just some comments on my part.  Nothing very useful...

On Fri, Mar 16, 2012 at 3:32 AM, Ruben Van Boxem
<[email protected]> wrote:
> Op 16 mrt. 2012 07:17 schreef "Jim Michaels" <[email protected]> het
> volgende:
>
>> do you submit a bug report anyway since this is in every compiler and tr1
>> examples abound?  many people like me think you are supposed to be using tr1
>> and that c++11 is just another side standard, not something that
>> encompasses...

Mostly speculation on my part...  I haven't researched or verified any of this.

Well, I would say that this is a real bug (although I haven't read the text
of tr1).  I would say that as long as std::tr1::uniform_int<> allows you to
specialize on <unsigned long long>, it really ought to work correctly
(although, hypothetically, the tr1 specification could say something to
the contrary).

As I understand it, tr1 is part of the standard, although only as a temporary
upgrade / fix.

So, on the one hand, it probably makes sense to report the bug (if it hasn't
been identified / reported already).  But, on the other hand, I wouldn't be
surprised if the bug doesn't get fixed, since it's "only" trr1, and tr1 has been
superseded by c++11, where the bug no longer appears.

I don't want to speak for Ruben or Kai (and friends), but I very much doubt
that mingw-w64 will invest effort in fixing this bug.

In any event, since you also see the bug in djgpp, my bet is that the bug
exists in the upstream gcc -- most likely in the tr1/random source code
that (most likely) mingw-w64 uses largely unchanged.  (If anyone has
easy access to a linux gcc, it might be interesting to see if the bug shows
up there, as well.)

So probably the upstream gcc is the right place to report the bug.  (Just
guessing.)  (I would imagine that if it gets fixed there, at some point the fix
would "trickle down" to mingw-w64.)

>
> C++11 is not "just another side standard. TR1 its the in-between thing here.
> Did you try msvs2008's <tr1/random>? This bug might be a bug in the tr1
> description. Did you even try ideone for this? If it's present there,
> chances are GCC or libstdc++ do nothing wrong, and instead tr1 is to blame.
>
> Use c++11, seriously. But note not all compilers or compiler versions
> implement everything. If your platforms don't have compiler or library
> support for what you need, and if tr1 doesn't offer what you need, use
> boost. It has everything you could wish for.

Boost raises n interesting question.  A lot of stuff in tr1 and c++11 originated
in boost (and I think random did).  It would be interesting to see if this bug
exists in current or older versions of boost.  I don't know the details of the
boost license, but it seems possible that gcc's code for tr1/random and
c++11's random are derived originally from boost code.  So, hypothetically,
the bug could have originated in boost.  (Again, all just speculation.)

> Ruben
>
>> it's still a bug, even if you choose to ignore it, and it still affects
>> people.  possibly a lot of people due to the Internet's varying page ages.
>> ...

My bottom line?  This is a real bug (and serious, if you use tr1/random).
But for me, using c++11's random is an adequate workaround / fix.


Happy Random Hacking!


K. Frank

------------------------------------------------------------------------------
This SF email is sponsosred by:
Try Windows Azure free for 90 days Click Here 
http://p.sf.net/sfu/sfd2d-msazure
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to