From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24327 invoked by alias); 14 Nov 2013 09:52:08 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Received: (qmail 24318 invoked by uid 89); 14 Nov 2013 09:52:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.7 required=5.0 tests=AWL,BAYES_00,RDNS_NONE autolearn=no version=3.3.2 X-HELO: rock.gnat.com Received: from Unknown (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-SHA encrypted) ESMTPS; Thu, 14 Nov 2013 09:52:06 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id 96CAE11671A; Thu, 14 Nov 2013 04:52:30 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id MJ+9ie-cgCUR; Thu, 14 Nov 2013 04:52:30 -0500 (EST) Received: from joel.gnat.com (localhost.localdomain [127.0.0.1]) by rock.gnat.com (Postfix) with ESMTP id 5F1EA11657E; Thu, 14 Nov 2013 04:52:28 -0500 (EST) Received: by joel.gnat.com (Postfix, from userid 1000) id 249BAE0CD6; Thu, 14 Nov 2013 13:51:54 +0400 (RET) Date: Thu, 14 Nov 2013 10:00:00 -0000 From: Joel Brobecker To: Pedro Alves Cc: gdb-patches@sourceware.org Subject: Re: [PATCH] New "make check-headers" rule. (was: Re: [RFA/commit 1/3] language.h: Add "symtab.h" #include) Message-ID: <20131114095154.GO3481@adacore.com> References: <1384151855-12926-1-git-send-email-brobecker@adacore.com> <5283CD04.3080501@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5283CD04.3080501@redhat.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-SW-Source: 2013-11/txt/msg00365.txt.bz2 > I wonder what people think of something like the patch below. > > $ make check-headers CHECK_HEADERS="language.h" > Checking headers. > for i in language.h ; do \ > gcc -g3 -O0 -I. -I../../src/gdb -I../../src/gdb/common -I../../src/gdb/config -DLOCALEDIR="\"/usr/local/share/locale\"" -DHAVE_CONFIG_H -I../../src/gdb/../include/opcode -I../../src/gdb/../opcodes/.. -I../../src/gdb/../readline/.. -I../bfd -I../../src/gdb/../bfd -I../../src/gdb/../include -I../libdecnumber -I../../src/gdb/../libdecnumber -I../../src/gdb/gnulib/import -Ibuild-gnulib/import -DTUI=1 -I/usr/include/python2.7 -I/usr/include/python2.7 -Wall -Wdeclaration-after-statement -Wpointer-arith -Wpointer-sign -Wno-unused -Wunused-value -Wunused-function -Wno-switch -Wno-char-subscripts -Wmissing-prototypes -Wdeclaration-after-statement -Wempty-body -Wmissing-parameter-type -Wold-style-declaration -Wold-style-definition -Wformat-nonliteral -Werror -c -o check-headers -Wno-error -fno-strict-aliasing -DNDEBUG -fwrapv -include defs.h \ > ../../src/gdb/$i -o /dev/null ; \ > done > ../../src/gdb/language.h:200:17: warning: ‘struct symbol’ declared inside parameter list [enabled by default] > ../../src/gdb/language.h:200:17: warning: its scope is only this definition or declaration, which is probably not what you want [enabled by default] > ../../src/gdb/language.h:242:13: warning: ‘struct symbol’ declared inside parameter list [enabled by default] > ../../src/gdb/language.h:263:14: warning: type defaults to ‘int’ in declaration of ‘domain_enum’ [-Wimplicit-int] > ../../src/gdb/language.h:263:8: warning: ‘struct block’ declared inside parameter list [enabled by default] > ../../src/gdb/language.h:294:5: error: expected specifier-qualifier-list before ‘VEC’ > make: *** [check-headers] Error 1 Pretty cool! Once it comes out clean for all header files, we could even add this to the "nightly" stuff we do, after sources have been packaged. We'd be sending an email when failures are detected. -- Joel