This is the mail archive of the gdb@sources.redhat.com 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: Coding style


(most notably Andrew :-)

It depends on the day of the week. Sometimes my new code contains lots of blank lines, sometimes it doesn't.


Btw, the blank line here:

int
max_register_size (struct gdbarch *gdbarch)
{
  struct regcache_descr *descr;

  descr = regcache_descr (gdbarch);
  return descr->max_register_size;
}

makes sense, but when contracted into:

int
max_register_size (struct gdbarch *gdbarch)
{
  struct regcache_descr *descr = regcache_descr (gdbarch);

  return descr->max_register_size;
}

or:


int
max_register_size (struct gdbarch *gdbarch)
{
  struct regcache_descr *descr = regcache_descr (gdbarch);
  return descr->max_register_size;
}

things get pretty arbitrary. Is "descr" a declaration or code body?


Anyway, if your new code adds blank lines, I can't remove them without rewritting the function - the requirement to keep white space changes separate from fixes stops this.

Andrew

PS: This is somewhat ironic, Stan was oft to complain that my code contained too many blank lines :-)



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