This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [RFA] New rules for ARI
- From: Pedro Alves <pedro at codesourcery dot com>
- To: gdb-patches at sourceware dot org
- Cc: Joel Brobecker <brobecker at adacore dot com>, Tom Tromey <tromey at redhat dot com>, Pierre Muller <pierre dot muller at ics-cnrs dot unistra dot fr>, "'Maxim Grigoriev'" <maxim at tensilica dot com>
- Date: Wed, 16 Mar 2011 14:15:32 +0000
- Subject: Re: [RFA] New rules for ARI
- References: <4D798969.8070309@tensilica.com> <m3aah17io7.fsf@fleche.redhat.com> <20110316140240.GQ31264@adacore.com>
On Wednesday 16 March 2011 14:02:40, Joel Brobecker wrote:
> > 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 :-(.
Maybe by including the in-tree readline headers with -isystem
rather than -I. I sense that other cases in other libraries
will appear though, and that it'd bring in more pain than benefit.
--
Pedro Alves