public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/108326] New: Question about definitions in c++config.h for gcc13 20221229
@ 2023-01-07  6:18 lukaszcz18 at wp dot pl
  2023-01-07 11:25 ` [Bug libstdc++/108326] " pinskia at gcc dot gnu.org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: lukaszcz18 at wp dot pl @ 2023-01-07  6:18 UTC (permalink / raw)
  To: gcc-bugs

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

            Bug ID: 108326
           Summary: Question about definitions in c++config.h for gcc13
                    20221229
           Product: gcc
           Version: 13.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: lukaszcz18 at wp dot pl
  Target Milestone: ---

Amateur questions
I know that creating exe files two years ago with <thread>, <mutex> with
_GLIBCXX_HAS_GTHREADS definition was impossible.
I don't know if someone made mistake or added additional functions in
c++confic.h, but gcc works differently.
Differences between versions 20221124 and 20221219.
/* Defined if sleep exists. */
/* #undef _GLIBCXX_HAVE_SLEEP */
/* Defined if service exists. */
/* #undef _GLIBCXX_HAVE_USLEEP */
/* Define if writev is available in <sys/uio.h>. */
/* Define if gthreads library is available. */
#define _GLIBCXX_HAS_GTHREADS 1
/* Defined if sched_yield is available. */
#define _GLIBCXX_USE_SCHED_YIELD 1
/* Defined if Sleep exists. */
#define _GLIBCXX_USE_WIN32_SLEEP 1
/* Define to 1 if a verbose library is built, or 0 otherwise. */
/* Define if a non-default location should be used for tzdata files. */
/* #undef _GLIBCXX_ZONEINFO_DIR */
/* Define to 1 if mutex_timedlock is available. */
#define_GTHREAD_USE_MUTEX_TIMEDLOCK 0

The question is.
Why is _GLIBCXX_HAS_GTHREADS enabled only for C++20 and above in <thread>?

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

* [Bug libstdc++/108326] Question about definitions in c++config.h for gcc13 20221229
  2023-01-07  6:18 [Bug c++/108326] New: Question about definitions in c++config.h for gcc13 20221229 lukaszcz18 at wp dot pl
@ 2023-01-07 11:25 ` pinskia at gcc dot gnu.org
  2023-01-07 15:42 ` redi at gcc dot gnu.org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu.org @ 2023-01-07 11:25 UTC (permalink / raw)
  To: gcc-bugs

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

Andrew Pinski <pinskia at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Target|                            |*-*-mingw

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
r13-4881-g9149a5b7e0a66b improved GNU threads library on native Windows so ....
I think this is by design ...

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

* [Bug libstdc++/108326] Question about definitions in c++config.h for gcc13 20221229
  2023-01-07  6:18 [Bug c++/108326] New: Question about definitions in c++config.h for gcc13 20221229 lukaszcz18 at wp dot pl
  2023-01-07 11:25 ` [Bug libstdc++/108326] " pinskia at gcc dot gnu.org
@ 2023-01-07 15:42 ` redi at gcc dot gnu.org
  2023-01-07 15:44 ` redi at gcc dot gnu.org
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2023-01-07 15:42 UTC (permalink / raw)
  To: gcc-bugs

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

Jonathan Wakely <redi at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|---                         |INVALID

--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> ---
Bugzilla is for bugs, questions belong on the mailing lists.

https://gcc.gnu.org/lists.html

(In reply to Jamaika from comment #0)
> Why is _GLIBCXX_HAS_GTHREADS enabled only for C++20 and above in <thread>?

It's not, so I don't know what you mean.

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

* [Bug libstdc++/108326] Question about definitions in c++config.h for gcc13 20221229
  2023-01-07  6:18 [Bug c++/108326] New: Question about definitions in c++config.h for gcc13 20221229 lukaszcz18 at wp dot pl
  2023-01-07 11:25 ` [Bug libstdc++/108326] " pinskia at gcc dot gnu.org
  2023-01-07 15:42 ` redi at gcc dot gnu.org
@ 2023-01-07 15:44 ` redi at gcc dot gnu.org
  2023-01-08 10:22 ` lukaszcz18 at wp dot pl
  2023-01-09  9:56 ` redi at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2023-01-07 15:44 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #3 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jamaika from comment #0)
> Amateur questions
> I know that creating exe files two years ago with <thread>, <mutex> with
> _GLIBCXX_HAS_GTHREADS definition was impossible.

This is just nonsense, so I assume you mean impossible when using mingw without
libwinpthread. It works fine on most targets, and for mingw-w64 when using
libwinpthread.

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

* [Bug libstdc++/108326] Question about definitions in c++config.h for gcc13 20221229
  2023-01-07  6:18 [Bug c++/108326] New: Question about definitions in c++config.h for gcc13 20221229 lukaszcz18 at wp dot pl
                   ` (2 preceding siblings ...)
  2023-01-07 15:44 ` redi at gcc dot gnu.org
@ 2023-01-08 10:22 ` lukaszcz18 at wp dot pl
  2023-01-09  9:56 ` redi at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: lukaszcz18 at wp dot pl @ 2023-01-08 10:22 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #4 from Jamaika <lukaszcz18 at wp dot pl> ---
Here was my mistake.
I tried adding c++config definitions to gcc 11.3.1 with _GLIBCXX_HAS_GTHREADS.
Unfortunately many more features are changed to native Windows.
http://msystem.waw.pl/x265/mingw-gcc1131-20221227.7z

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

* [Bug libstdc++/108326] Question about definitions in c++config.h for gcc13 20221229
  2023-01-07  6:18 [Bug c++/108326] New: Question about definitions in c++config.h for gcc13 20221229 lukaszcz18 at wp dot pl
                   ` (3 preceding siblings ...)
  2023-01-08 10:22 ` lukaszcz18 at wp dot pl
@ 2023-01-09  9:56 ` redi at gcc dot gnu.org
  4 siblings, 0 replies; 6+ messages in thread
From: redi at gcc dot gnu.org @ 2023-01-09  9:56 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #5 from Jonathan Wakely <redi at gcc dot gnu.org> ---
(In reply to Jamaika from comment #4)
> I tried adding c++config definitions to gcc 11.3.1 with
> _GLIBCXX_HAS_GTHREADS.

What do you mean? The c++config.h file is created by GCC during installation,
you can't edit it, and you can't define (or redefine) those macros.

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

end of thread, other threads:[~2023-01-09  9:56 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-01-07  6:18 [Bug c++/108326] New: Question about definitions in c++config.h for gcc13 20221229 lukaszcz18 at wp dot pl
2023-01-07 11:25 ` [Bug libstdc++/108326] " pinskia at gcc dot gnu.org
2023-01-07 15:42 ` redi at gcc dot gnu.org
2023-01-07 15:44 ` redi at gcc dot gnu.org
2023-01-08 10:22 ` lukaszcz18 at wp dot pl
2023-01-09  9:56 ` redi at gcc dot gnu.org

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