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: [RFA] New rules for ARI


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


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