This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] New "make check-headers" rule. (was: Re: [RFA/commit 1/3] language.h: Add "symtab.h" #include)
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Pedro Alves <palves at redhat dot com>
- Cc: gdb-patches at sourceware dot org
- Date: Thu, 14 Nov 2013 13:51:54 +0400
- Subject: Re: [PATCH] New "make check-headers" rule. (was: Re: [RFA/commit 1/3] language.h: Add "symtab.h" #include)
- Authentication-results: sourceware.org; auth=none
- References: <1384151855-12926-1-git-send-email-brobecker at adacore dot com> <5283CD04 dot 3080501 at redhat dot com>
> 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