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


> 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


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