From 8e2f7c68111ba8fae795ee08b6822e21ab8cfa38 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Wed, 21 Oct 2015 15:14:13 +0000 Subject: Use -Wold-style-definition. This patch makes glibc build with -Wold-style-definition to avoid old-style function definitions creeping back in by accident. Tested for x86_64 and x86 (testsuite, and that installed shared libraries are unchanged by the patch). Also tested build for arm, mips64 and powerpc32. Hopefully there aren't any remaining system-specific files with old-style definitions whose formatting evaded my searches, but if there are, they will be easy to fix. * Makeconfig (+gccwarn-c): Add -Wold-style-definition. * Makefile ($(objpfx)c++-types-check.out): Filter out $(+gccwarn-c) instead of -Wstrict-prototypes. --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index a2abfb9273..b2dd771a19 100644 --- a/Makefile +++ b/Makefile @@ -256,7 +256,7 @@ ifneq ($(CXX),no) vpath c++-types.data $(+sysdep_dirs) $(objpfx)c++-types-check.out: c++-types.data scripts/check-c++-types.sh - scripts/check-c++-types.sh $< $(CXX) $(filter-out -std=gnu99 -Wstrict-prototypes,$(CFLAGS)) $(CPPFLAGS) > $@; \ + scripts/check-c++-types.sh $< $(CXX) $(filter-out -std=gnu99 $(+gccwarn-c),$(CFLAGS)) $(CPPFLAGS) > $@; \ $(evaluate-test) endif -- cgit v1.2.3