This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] New rules for ARI
- From: Joel Brobecker <brobecker at adacore dot com>
- To: Tom Tromey <tromey at redhat dot com>
- Cc: Pierre Muller <pierre dot muller at ics-cnrs dot unistra dot fr>, 'Maxim Grigoriev' <maxim at tensilica dot com>, gdb-patches at sourceware dot org
- Date: Wed, 16 Mar 2011 07:02:40 -0700
- Subject: Re: [RFA] New rules for ARI
- References: <4D798969.8070309@tensilica.com> <20110311064501.GA30306@adacore.com> <41860.1858466447$1299837420@news.gmane.org> <m3aah17io7.fsf@fleche.redhat.com>
> Pierre> Reading Joel's comment, I thought
> Pierre> that the missing 'void' inside braces
> Pierre> should be a gdb_ari.sh output,
> Pierre> so I tried to write a new rule
> Pierre> to find out if functions that have no parameters
> Pierre> do use () instead of (void).
>
> I wonder if -Wstrict-prototypes would catch this.
Actually, it would. But when I tried to use it in our build,
I quickly hit a problem, because the headers we include might not
have strict prototypes. For instance, readline defines:
typedef int Function ();
typedef void VFunction ();
typedef char *CPFunction ();
typedef char **CPPFunction ();
So, unless there is a way to say check strict-prototyping certain
files only, it's going to be tough to use :-(.
--
Joel