Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Pedro Alves <pedro@palves.net>
To: Hannes Domani <ssbssa@yahoo.de>,
	"gdb-patches@sourceware.org" <gdb-patches@sourceware.org>,
	"simon.marchi@polymtl.ca" <simon.marchi@polymtl.ca>
Subject: Re: [PATCH] gdbsupport: bump unordered_dense library to 4.6.0
Date: Wed, 8 Oct 2025 20:19:47 +0100	[thread overview]
Message-ID: <c7823be8-7770-4f6a-9316-9a45b60d77a7@palves.net> (raw)
In-Reply-To: <1362579628.1523332.1759945710904@mail.yahoo.com>

Hi!

On 2025-10-08 18:48, Hannes Domani wrote:

>> +// <memory_resource> includes <mutex>, which fails to compile if
>> +// targeting GCC >= 13 with the (rewritten) win32 thread model, and
>> +// targeting Windows earlier than Vista (0x600).  GCC predefines
>> +// _REENTRANT when using the 'posix' model, and doesn't when using the
>> +// 'win32' model.
>> +#    if defined __MINGW64__ && defined __GNUC__ && __GNUC__ >= 13 && !defined _REENTRANT
>> +// _WIN32_WINNT is guaranteed to be defined here because of the
>> +// <cstdint> inclusion above.
>> +#        ifndef _WIN32_WINNT
>> +#            error "_WIN32_WINNT not defined"
>> +#        endif
>> +#        if _WIN32_WINNT < 0x600
>> +#            define ANKERL_MEMORY_RESOURCE_IS_BAD() 1 // NOLINT(cppcoreguidelines-macro-usage)
>> +#        endif
>> +#    endif
>> +#    ifndef ANKERL_MEMORY_RESOURCE_IS_BAD
>> +#        define ANKERL_MEMORY_RESOURCE_IS_BAD() 0 // NOLINT(cppcoreguidelines-macro-usage)
>> +#    endif
> 
> This mentions '(rewritten) win32' and 'posix' thread models.

The win32 thread model was completely rewritten in GCC 13, that's what I meant
by '(rewritten) win32'.  It seems like this isn't very common knowledge, which IMHO leads
to people still using other models when they probably don't need to.

See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115105

> What about the 'mcf' thread model, 

No sure.  I've never used it.  Did that ever make it to GCC upstream?  I'm under the impression it did not.

I don't really know if there is still a point in using that model vs stock win32 since GCC 13.

> or is that meant with 'rewritten win32'?

No.

Pedro Alves


  reply	other threads:[~2025-10-08 19:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-08 16:10 simon.marchi
2025-10-08 17:19 ` Tom Tromey
2025-10-08 17:48 ` Hannes Domani
2025-10-08 19:19   ` Pedro Alves [this message]
2025-10-27 16:03     ` Simon Marchi
2025-10-27 17:13       ` Hannes Domani

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=c7823be8-7770-4f6a-9316-9a45b60d77a7@palves.net \
    --to=pedro@palves.net \
    --cc=gdb-patches@sourceware.org \
    --cc=simon.marchi@polymtl.ca \
    --cc=ssbssa@yahoo.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox