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: New ARI warning Sat Mar 12 01:53:29 UTC 2011


On Monday 14 March 2011 12:34:49, Eli Zaretskii wrote:
> > From: Pedro Alves <pedro@codesourcery.com>
> > Date: Mon, 14 Mar 2011 12:13:43 +0000
> > Cc: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
> > 
> > "A function declaration should not have its name in column zero.  A
> > function definition should have its name in column zero."
> 
> At the very least, please reformat the prototypes like this:
> 
> extern whatever_type foo (type1_t,
>        		     	  type2_t, const char **, foobar_t);
> 
> not like Pierre originally suggested.
> 
> That is, let the left paren and at least one argument be on the same
> line as the function name.

I'm fine with your suggestion, and in fact it's my preference
as well.  However, there _are_ cases where you just can't do that,
because the return type + function name + parameter end up being
too long for a single line.  It's even easier to happen when you need
to spell out the parameter name, not just the type (to refer
to in the describing comment).

-- 
Pedro Alves


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