This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] New "make check-headers" rule. (was: Re: [RFA/commit 1/3] language.h: Add "symtab.h" #include)


> 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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]