public inbox for gdb-patches@sourceware.org
 help / color / mirror / Atom feed
From: Joel Brobecker <brobecker@adacore.com>
To: Pedro Alves <palves@redhat.com>
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)
Date: Thu, 14 Nov 2013 10:00:00 -0000	[thread overview]
Message-ID: <20131114095154.GO3481@adacore.com> (raw)
In-Reply-To: <5283CD04.3080501@redhat.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

  reply	other threads:[~2013-11-14  9:52 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-11  6:38 [RFA/commit 1/3] language.h: Add "symtab.h" #include Joel Brobecker
2013-11-11  6:39 ` [RFA 2/3] New function cli-utils.c:extract_arg_const Joel Brobecker
2013-11-13 19:35   ` Pedro Alves
2013-11-14 10:55     ` pushed: " Joel Brobecker
2013-11-11  6:55 ` [RFC 3/3] GDB/MI: Add new "--language LANG" command option Joel Brobecker
2013-11-11  7:02   ` Joel Brobecker
2013-11-11 17:20     ` Eli Zaretskii
2013-11-11 16:29   ` Eli Zaretskii
2013-11-13 19:49   ` Pedro Alves
2013-11-14 11:17     ` Joel Brobecker
2013-11-13 19:34 ` [PATCH] New "make check-headers" rule. (was: Re: [RFA/commit 1/3] language.h: Add "symtab.h" #include) Pedro Alves
2013-11-14 10:00   ` Joel Brobecker [this message]
2013-11-14 21:32   ` [PATCH] New "make check-headers" rule Tom Tromey
2014-01-13 19:42     ` Pedro Alves
2013-11-14 10:55 ` pushed: [RFA/commit 1/3] language.h: Add "symtab.h" #include Joel Brobecker

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20131114095154.GO3481@adacore.com \
    --to=brobecker@adacore.com \
    --cc=gdb-patches@sourceware.org \
    --cc=palves@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).