From patchwork Mon Sep 8 12:17:11 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 2674 Received: (qmail 30003 invoked by alias); 8 Sep 2014 12:17:25 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 29978 invoked by uid 89); 8 Sep 2014 12:17:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-4.5 required=5.0 tests=AWL, BAYES_00, RP_MATCHES_RCVD, SPF_HELO_PASS, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mx1.redhat.com Message-ID: <540D9E47.6020904@redhat.com> Date: Mon, 08 Sep 2014 14:17:11 +0200 From: Florian Weimer User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 MIME-Version: 1.0 To: GNU C Library Subject: [PATCH] Turn implict-function-declaration warnings into errors GCC 4.4, the minimum compiler version, supports this option. Unlike other warnings, -Wimplicit-function-declaration warnings should be independent of compiler versions, so this change should not cause compiler-specific build failures (the usual trouble with -Werror). Testing this change revealed one missing #include file in a test case. From 842685f0c3f38d81474e809ff0b112099ed11e1c Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Mon, 8 Sep 2014 13:49:36 +0200 Subject: [PATCH 1/2] Turn on -Werror=implicit-function-declaration GCC 4.4, the minimum compiler version, supports this option. Unlike other warnings, -Wimplicit-function-declaration warnings should be independent of compiler versions, so this change should not cause compiler-specific build failures. --- ChangeLog | 8 ++++++++ Makeconfig | 2 +- stdlib/tst-tls-atexit-lib.c | 2 ++ 3 files changed, 11 insertions(+), 1 deletion(-) 2014-09-08 Florian Weimer * Makeconfig (gccwarn-c): Turn implicit-function-declaration warnings into errors. * stdlib/tst-tls-atexit-lib.c: Include , for the __cxa_thread_atexit_impl prototype. diff --git a/Makeconfig b/Makeconfig index cef0f06..0f8069b 100644 --- a/Makeconfig +++ b/Makeconfig @@ -717,7 +717,7 @@ else +gccwarn := -Wall -Wwrite-strings -Winline endif +gccwarn += -Wundef -+gccwarn-c = -Wstrict-prototypes ++gccwarn-c = -Wstrict-prototypes -Werror=implicit-function-declaration # We do not depend on the address of constants in different files to be # actually different, so allow the compiler to merge them all. diff --git a/stdlib/tst-tls-atexit-lib.c b/stdlib/tst-tls-atexit-lib.c index 964f94b..b67d62f 100644 --- a/stdlib/tst-tls-atexit-lib.c +++ b/stdlib/tst-tls-atexit-lib.c @@ -16,6 +16,8 @@ License along with the GNU C Library; if not, see . */ +#include + extern void *__dso_handle; typedef struct -- 1.9.3