public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer <fweimer@redhat.com>
To: Joseph Myers <joseph@codesourcery.com>
Cc: <libc-alpha@sourceware.org>
Subject: Re: Fix build of nptl/tst-thread_local1.cc with GCC 12
Date: Mon, 02 Aug 2021 18:25:44 +0200	[thread overview]
Message-ID: <878s1jlson.fsf@oldenburg.str.redhat.com> (raw)
In-Reply-To: <alpine.DEB.2.22.394.2108021615400.701636@digraph.polyomino.org.uk> (Joseph Myers's message of "Mon, 2 Aug 2021 16:16:10 +0000")

* Joseph Myers:

> The test nptl/tst-thread_local1.cc fails to build with GCC mainline
> because of changes to what libstdc++ headers implicitly include what
> other headers:
>
> tst-thread_local1.cc: In function 'int do_test()':
> tst-thread_local1.cc:177:5: error: variable 'std::array<std::pair<const char*, std::function<void(void* (*)(void*))> >, 2> do_thread_X' has initializer but incomplete type
>   177 |     do_thread_X
>       |     ^~~~~~~~~~~
>
> Fix this by adding an explicit include of <array>.
>
> Tested with build-many-glibcs.py for aarch64-linux-gnu.
>
> diff --git a/nptl/tst-thread_local1.cc b/nptl/tst-thread_local1.cc
> index 9608afa..338aafe 100644
> --- a/nptl/tst-thread_local1.cc
> +++ b/nptl/tst-thread_local1.cc
> @@ -21,6 +21,7 @@
>  #include <stdio.h>
>  #include <string.h>
>  
> +#include <array>
>  #include <functional>
>  #include <string>
>  #include <thread>

Okay, thanks.

Florian


      reply	other threads:[~2021-08-02 16:25 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-02 16:16 Joseph Myers
2021-08-02 16:25 ` Florian Weimer [this message]

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=878s1jlson.fsf@oldenburg.str.redhat.com \
    --to=fweimer@redhat.com \
    --cc=joseph@codesourcery.com \
    --cc=libc-alpha@sourceware.org \
    /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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).