public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug bootstrap/100186] New: lto-wrapper.c assumes std::thread
@ 2021-04-21 15:52 dje at gcc dot gnu.org
2021-04-21 15:52 ` [Bug bootstrap/100186] " dje at gcc dot gnu.org
` (9 more replies)
0 siblings, 10 replies; 11+ messages in thread
From: dje at gcc dot gnu.org @ 2021-04-21 15:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100186
Bug ID: 100186
Summary: lto-wrapper.c assumes std::thread
Product: gcc
Version: 12.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: bootstrap
Assignee: unassigned at gcc dot gnu.org
Reporter: dje at gcc dot gnu.org
Target Milestone: ---
Target: powerpc-ibm-aix*
lto-wrapper.c:1288:37: error 'std::thread' has not been declared
unsigned long nthreads_var = std::thread::hardware_concurrency ();
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug bootstrap/100186] lto-wrapper.c assumes std::thread
2021-04-21 15:52 [Bug bootstrap/100186] New: lto-wrapper.c assumes std::thread dje at gcc dot gnu.org
@ 2021-04-21 15:52 ` dje at gcc dot gnu.org
2021-04-21 16:09 ` dje at gcc dot gnu.org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: dje at gcc dot gnu.org @ 2021-04-21 15:52 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100186
David Edelsohn <dje at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|--- |12.0
Last reconfirmed| |2021-04-21
CC| |mliska at suse dot cz
Ever confirmed|0 |1
Status|UNCONFIRMED |NEW
--- Comment #1 from David Edelsohn <dje at gcc dot gnu.org> ---
Confirmed.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug bootstrap/100186] lto-wrapper.c assumes std::thread
2021-04-21 15:52 [Bug bootstrap/100186] New: lto-wrapper.c assumes std::thread dje at gcc dot gnu.org
2021-04-21 15:52 ` [Bug bootstrap/100186] " dje at gcc dot gnu.org
@ 2021-04-21 16:09 ` dje at gcc dot gnu.org
2021-04-21 16:56 ` jakub at gcc dot gnu.org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: dje at gcc dot gnu.org @ 2021-04-21 16:09 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100186
--- Comment #2 from David Edelsohn <dje at gcc dot gnu.org> ---
Created attachment 50650
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=50650&action=edit
pre-processed source for lto-wrapper.c
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug bootstrap/100186] lto-wrapper.c assumes std::thread
2021-04-21 15:52 [Bug bootstrap/100186] New: lto-wrapper.c assumes std::thread dje at gcc dot gnu.org
2021-04-21 15:52 ` [Bug bootstrap/100186] " dje at gcc dot gnu.org
2021-04-21 16:09 ` dje at gcc dot gnu.org
@ 2021-04-21 16:56 ` jakub at gcc dot gnu.org
2021-04-21 17:17 ` redi at gcc dot gnu.org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-04-21 16:56 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100186
Jakub Jelinek <jakub at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |jakub at gcc dot gnu.org
--- Comment #3 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
Yeah, only GCC 10 and later seems to define std::thread in <thread>
unconditionally, older releases made it conditional on #ifdef
_GLIBCXX_HAS_GTHREADS or on #if defined(_GLIBCXX_HAS_GTHREADS) &&
defined(_GLIBCXX_USE_C99_STDINT_TR1)
The fact that something is in C++11 doesn't mean we can assume it in GCC,
while GCC 4.8.x which we still want to support had roughly complete C++11 FE
support, I think the libstdc++ side wasn't there yet.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug bootstrap/100186] lto-wrapper.c assumes std::thread
2021-04-21 15:52 [Bug bootstrap/100186] New: lto-wrapper.c assumes std::thread dje at gcc dot gnu.org
` (2 preceding siblings ...)
2021-04-21 16:56 ` jakub at gcc dot gnu.org
@ 2021-04-21 17:17 ` redi at gcc dot gnu.org
2021-04-21 17:19 ` dje at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: redi at gcc dot gnu.org @ 2021-04-21 17:17 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100186
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> ---
And opinions differ on whether "define it but make it useless" or "don't define
it" is the right answer.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug bootstrap/100186] lto-wrapper.c assumes std::thread
2021-04-21 15:52 [Bug bootstrap/100186] New: lto-wrapper.c assumes std::thread dje at gcc dot gnu.org
` (3 preceding siblings ...)
2021-04-21 17:17 ` redi at gcc dot gnu.org
@ 2021-04-21 17:19 ` dje at gcc dot gnu.org
2021-04-21 17:59 ` marxin at gcc dot gnu.org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: dje at gcc dot gnu.org @ 2021-04-21 17:19 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100186
--- Comment #5 from David Edelsohn <dje at gcc dot gnu.org> ---
For example, in GCC 6:
#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
namespace std _GLIBCXX_VISIBILITY(default)
{
_GLIBCXX_BEGIN_NAMESPACE_VERSION
/**
* @defgroup threads Threads
* @ingroup concurrency
*
* Classes for thread support.
* @{
*/
/// thread
class thread
{
If we are going to support bootstrap with releases of GCC back to GCC 6 or GCC
4.8, the source code cannot assume that std::thread exists.
However, it's probably reasonable to assume hardware_concurrency of 1 when
compiling in a mode without GTHREADS.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug bootstrap/100186] lto-wrapper.c assumes std::thread
2021-04-21 15:52 [Bug bootstrap/100186] New: lto-wrapper.c assumes std::thread dje at gcc dot gnu.org
` (4 preceding siblings ...)
2021-04-21 17:19 ` dje at gcc dot gnu.org
@ 2021-04-21 17:59 ` marxin at gcc dot gnu.org
2021-04-21 18:03 ` marxin at gcc dot gnu.org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-04-21 17:59 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100186
--- Comment #6 from Martin Liška <marxin at gcc dot gnu.org> ---
Mine.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug bootstrap/100186] lto-wrapper.c assumes std::thread
2021-04-21 15:52 [Bug bootstrap/100186] New: lto-wrapper.c assumes std::thread dje at gcc dot gnu.org
` (5 preceding siblings ...)
2021-04-21 17:59 ` marxin at gcc dot gnu.org
@ 2021-04-21 18:03 ` marxin at gcc dot gnu.org
2021-04-21 18:33 ` jakub at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-04-21 18:03 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100186
--- Comment #7 from Martin Liška <marxin at gcc dot gnu.org> ---
> The fact that something is in C++11 doesn't mean we can assume it in GCC,
> while GCC 4.8.x which we still want to support had roughly complete C++11 FE
> support, I think the libstdc++ side wasn't there yet.
Do we really support it? https://gcc.gnu.org/install/prerequisites.html
mentions that an 'ISO C++11 compiler' is required.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug bootstrap/100186] lto-wrapper.c assumes std::thread
2021-04-21 15:52 [Bug bootstrap/100186] New: lto-wrapper.c assumes std::thread dje at gcc dot gnu.org
` (6 preceding siblings ...)
2021-04-21 18:03 ` marxin at gcc dot gnu.org
@ 2021-04-21 18:33 ` jakub at gcc dot gnu.org
2021-04-21 19:35 ` marxin at gcc dot gnu.org
2021-04-21 19:38 ` marxin at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: jakub at gcc dot gnu.org @ 2021-04-21 18:33 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100186
--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> ---
(In reply to Martin Liška from comment #7)
> > The fact that something is in C++11 doesn't mean we can assume it in GCC,
> > while GCC 4.8.x which we still want to support had roughly complete C++11 FE
> > support, I think the libstdc++ side wasn't there yet.
>
> Do we really support it? https://gcc.gnu.org/install/prerequisites.html
> mentions that an 'ISO C++11 compiler' is required.
Yes, we do, support back to 4.8.x was part of the switch to C++11 language
decision.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug bootstrap/100186] lto-wrapper.c assumes std::thread
2021-04-21 15:52 [Bug bootstrap/100186] New: lto-wrapper.c assumes std::thread dje at gcc dot gnu.org
` (7 preceding siblings ...)
2021-04-21 18:33 ` jakub at gcc dot gnu.org
@ 2021-04-21 19:35 ` marxin at gcc dot gnu.org
2021-04-21 19:38 ` marxin at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-04-21 19:35 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100186
Martin Liška <marxin at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Resolution|--- |FIXED
Status|NEW |RESOLVED
--- Comment #9 from Martin Liška <marxin at gcc dot gnu.org> ---
I reverted the commit in g:0a18305ee11e139838771f96c5a037a29606236e.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug bootstrap/100186] lto-wrapper.c assumes std::thread
2021-04-21 15:52 [Bug bootstrap/100186] New: lto-wrapper.c assumes std::thread dje at gcc dot gnu.org
` (8 preceding siblings ...)
2021-04-21 19:35 ` marxin at gcc dot gnu.org
@ 2021-04-21 19:38 ` marxin at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: marxin at gcc dot gnu.org @ 2021-04-21 19:38 UTC (permalink / raw)
To: gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100186
--- Comment #10 from Martin Liška <marxin at gcc dot gnu.org> ---
> Yes, we do, support back to 4.8.x was part of the switch to C++11 language
> decision.
Can you please document that requirement?
I really don't get it, we decided to move to a more recent C++ standard, but we
still support a compiler with partial (or incomplete) support of the C++
standard.
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2021-04-21 19:38 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-21 15:52 [Bug bootstrap/100186] New: lto-wrapper.c assumes std::thread dje at gcc dot gnu.org
2021-04-21 15:52 ` [Bug bootstrap/100186] " dje at gcc dot gnu.org
2021-04-21 16:09 ` dje at gcc dot gnu.org
2021-04-21 16:56 ` jakub at gcc dot gnu.org
2021-04-21 17:17 ` redi at gcc dot gnu.org
2021-04-21 17:19 ` dje at gcc dot gnu.org
2021-04-21 17:59 ` marxin at gcc dot gnu.org
2021-04-21 18:03 ` marxin at gcc dot gnu.org
2021-04-21 18:33 ` jakub at gcc dot gnu.org
2021-04-21 19:35 ` marxin at gcc dot gnu.org
2021-04-21 19:38 ` marxin 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).