Proposal: convert function definitions to prototyped form
Andrew Cagney
ac131313@cygnus.com
Sat Jun 3 18:18:00 GMT 2000
Kevin Buettner wrote:
>
> On Jun 3, 6:58am, Eli Zaretskii wrote:
>
> > So with a script, we will always need a verification tool that can be
> > trusted to find any potential bugs introduced by reformatting.
>
> Right.
>
> That's why I wrote check-decls (see
> http://sourceware.cygnus.com/ml/gdb/2000-06/msg00028.html
> ) which takes the result of comparing (via diff -u) the original
> sources with the protoized sources and produces a C source file in
> which the portions from the protoized sources are used to construct
> prototypes and the portions from the original sources are used to
> construct (potentially?) corresponding function definitions. We can
> then invoke the C compiler (gcc -c -Wall) on the result and see what
> kinds of warnings and errors are produced.
Rather than -Wall (badly missnamed) I'd suggest several more carefully
selected flags such as: -Wimplict -Wreturn-type -Wstrict-prototypes
-Wmissing-declarations. No need to make life difficult for your self
:-)
Andrew
More information about the Gdb
mailing list