Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Re: Small list of perceived flaws of MinGW

32 views
Skip to first unread message

Scott Lurndal

unread,
Aug 29, 2018, 4:49:12 PM8/29/18
to
r...@zedat.fu-berlin.de (Stefan Ram) writes:

[snip mingw complaints]

>
> And when do we get valgrind under Windows?
>
It's available for Windows 10, just install WSL and the
ubuntu distro.

David Brown

unread,
Aug 30, 2018, 3:04:49 AM8/30/18
to
On 29/08/18 22:16, Stefan Ram wrote:
> The successor of »srand( time( 0 ))« is supposed to be
>
> ::std::mt19937 algorithm{ ::std::random_device{}() };
>
> . But with MinGW, a random number generating algorithm
> initialized in this way always seems to produce the same
> sequence (AFAIK).
>
> GCC now has sanitizers for addresses and UB, but not
> when you use MinGW (AFAIK).
>
> GDB has a TUI (Ctrl-X A) and an embedded Python interpreter,
> just not when you use the GDB of MinGW (AFAIK).
>
> And then there's this requirement to sometimes #define
> »__USE_MINGW_ANSI_STDIO« just to get a compliant standard I/O
> (AFAIK).
>
> (I just had to write down this collection somewhere before
> I forget it.)
>
> (Of course, I /am/ grateful to the creators of MinGW that
> something like this is available for Windows at all.)
>
> And when do we get valgrind under Windows?
>

Just to be clear here - are you using gcc from the old
<http://mingw.org/> site, or are you using the much newer and more
powerful <http://mingw-w64.org/doku.php> version?

(It is entirely believable that this too has limitations. In
particular, the address sanitizers and leak detection work by fancy
games with virtual memory settings - these techniques may simply not
have equivalents in Windows.)

Alf P. Steinbach

unread,
Aug 30, 2018, 5:55:30 AM8/30/18
to
On 29.08.2018 22:16, Stefan Ram wrote:
> The successor of »srand( time( 0 ))« is supposed to be
>
> ::std::mt19937 algorithm{ ::std::random_device{}() };
>
> . But with MinGW, a random number generating algorithm
> initialized in this way always seems to produce the same
> sequence (AFAIK).

Oh look.

<url:
https://github.com/alf-p-steinbach/Wrapped-stdlib/blob/master/source/fix/gcc_random_device.hpp>

-------------------------------------------------------------------------
#pragma once // Source encoding: utf-8 with BOM ∩
// #include <stdlib/fix/gcc_random_device.hpp>

#ifndef STDLIB_NO_FIX_OF_RANDOM_DEVICE
# ifdef __GNUC__
# undef _GLIBCXX_USE_RANDOM_TR1
# define _GLIBCXX_USE_RANDOM_TR1
# endif
#endif
#include <random>
-------------------------------------------------------------------------


[snip further grievances]

My main problem with g++ in Windows is that the colorization of
diagnostics doesn't work, even in Windows 10 which supports ANSI escape
sequences in consoles.


Cheers!,

- Alf

0 new messages