From b89a0f7b4ae0fafb5500de0d164f54b5be8f5da0 Mon Sep 17 00:00:00 2001 From: Sam James Date: Fri, 4 Nov 2022 02:32:49 +0000 Subject: [PATCH 1/3] gh-99086: Build: Fix -Wimplicit-int in PTHREAD_SCOPE_SYSTEM check (#99085) Clang 16 makes -Wimplicit-int fatal by default. Avoids errors like: ``` conftest.c:142:7: error: type specifier missing, defaults to 'int'; ISO C99 and later do not support implicit int [-Wimplicit-int] ``` Signed-off-by: Sam James --- .../next/Build/2022-11-04-02-58-10.gh-issue-99086.DV_4Br.rst | 1 + configure | 2 +- configure.ac | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) create mode 100644 Misc/NEWS.d/next/Build/2022-11-04-02-58-10.gh-issue-99086.DV_4Br.rst diff --git a/Misc/NEWS.d/next/Build/2022-11-04-02-58-10.gh-issue-99086.DV_4Br.rst b/Misc/NEWS.d/next/Build/2022-11-04-02-58-10.gh-issue-99086.DV_4Br.rst new file mode 100644 index 00000000000000..1e7c1a16e74030 --- /dev/null +++ b/Misc/NEWS.d/next/Build/2022-11-04-02-58-10.gh-issue-99086.DV_4Br.rst @@ -0,0 +1 @@ +Fix ``-Wimplicit-int`` warning in configure.ac when testing for PTHREAD_SCOPE_SYSTEM. diff --git a/configure b/configure index 4acf91f22107f4..521c50e06286a2 100755 --- a/configure +++ b/configure @@ -11134,7 +11134,7 @@ else void *foo(void *parm) { return NULL; } - main() { + int main() { pthread_attr_t attr; pthread_t id; if (pthread_attr_init(&attr)) return (-1); diff --git a/configure.ac b/configure.ac index 48d86ef79199e1..95a9b22153fc2d 100644 --- a/configure.ac +++ b/configure.ac @@ -3367,7 +3367,7 @@ if test "$posix_threads" = "yes"; then void *foo(void *parm) { return NULL; } - main() { + int main() { pthread_attr_t attr; pthread_t id; if (pthread_attr_init(&attr)) return (-1); From 4ea9a155cffff1c0550afd64dbd9751189f94aac Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Fri, 4 Nov 2022 14:07:55 +0100 Subject: [PATCH 2/3] Update Misc/NEWS.d/next/Build/2022-11-04-02-58-10.gh-issue-99086.DV_4Br.rst --- .../next/Build/2022-11-04-02-58-10.gh-issue-99086.DV_4Br.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/NEWS.d/next/Build/2022-11-04-02-58-10.gh-issue-99086.DV_4Br.rst b/Misc/NEWS.d/next/Build/2022-11-04-02-58-10.gh-issue-99086.DV_4Br.rst index 1e7c1a16e74030..9fe652ee649299 100644 --- a/Misc/NEWS.d/next/Build/2022-11-04-02-58-10.gh-issue-99086.DV_4Br.rst +++ b/Misc/NEWS.d/next/Build/2022-11-04-02-58-10.gh-issue-99086.DV_4Br.rst @@ -1 +1 @@ -Fix ``-Wimplicit-int`` warning in configure.ac when testing for PTHREAD_SCOPE_SYSTEM. +Fix ``-Wimplicit-int`` compiler warning n :program:`configure` check for ``PTHREAD_SCOPE_SYSTEM``. From f5174cd040fa861142b848cbbaaf1da885a16e3a Mon Sep 17 00:00:00 2001 From: "Erlend E. Aasland" Date: Fri, 4 Nov 2022 14:08:25 +0100 Subject: [PATCH 3/3] Update 2022-11-04-02-58-10.gh-issue-99086.DV_4Br.rst --- .../next/Build/2022-11-04-02-58-10.gh-issue-99086.DV_4Br.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Misc/NEWS.d/next/Build/2022-11-04-02-58-10.gh-issue-99086.DV_4Br.rst b/Misc/NEWS.d/next/Build/2022-11-04-02-58-10.gh-issue-99086.DV_4Br.rst index 9fe652ee649299..e320ecfdfbb791 100644 --- a/Misc/NEWS.d/next/Build/2022-11-04-02-58-10.gh-issue-99086.DV_4Br.rst +++ b/Misc/NEWS.d/next/Build/2022-11-04-02-58-10.gh-issue-99086.DV_4Br.rst @@ -1 +1 @@ -Fix ``-Wimplicit-int`` compiler warning n :program:`configure` check for ``PTHREAD_SCOPE_SYSTEM``. +Fix ``-Wimplicit-int`` compiler warning in :program:`configure` check for ``PTHREAD_SCOPE_SYSTEM``.