From: Mark Kettenis <mark.kettenis@xs4all.nl>
To: pierre.muller@ics-cnrs.unistra.fr
Cc: eliz@gnu.org, pedro@codesourcery.com, gdb-patches@sourceware.org
Subject: Re: New ARI warning Sat Mar 12 01:53:29 UTC 2011
Date: Sat, 19 Mar 2011 21:15:00 -0000 [thread overview]
Message-ID: <201103191730.p2JHUnQk025106@glazunov.sibelius.xs4all.nl> (raw)
In-Reply-To: <001b01cbe253$048d6790$0da836b0$@muller@ics-cnrs.unistra.fr> (pierre.muller@ics-cnrs.unistra.fr)
> From: "Pierre Muller" <pierre.muller@ics-cnrs.unistra.fr>
> Date: Mon, 14 Mar 2011 15:20:48 +0100
>
> > > 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.
> >
> > What's wrong with leaving a single long line in such cases? They are
> > supposed to be very rare (if typedefs are used for complex function
> > arguments).
>
> Take for instance a look at hppa-tdep.h:
> my patch changes
> <<<hppa-tdep.h>>>>
> extern struct hppa_objfile_private *
> hppa_init_objfile_priv_data (struct objfile *objfile);
> <<<hppa-tdep.h>>>>
> into:
>
> <<<hppa-tdep.h>>>>
> extern struct hppa_objfile_private *
> hppa_init_objfile_priv_data (struct objfile *objfile);
> <<<hppa-tdep.h>>>>
>
> Your suggestion would lead to:
> <<<hppa-tdep.h>>>>
> extern struct hppa_objfile_private * hppa_init_objfile_priv_data (struct
> objfile *objfile);
> <<<hppa-tdep.h>>>>
>
> on a single line (might have been corrupted by my mailer...)
> 91 column wide...
>
> but if you look at the rest of the hppa-tdep.h file, you will find:
>
> <<<hppa-tdep.h>>>>
> extern struct value *
> hppa_frame_prev_register_helper (struct frame_info *this_frame,
> struct trad_frame_saved_reg *saved_regs,
> int regnum);
>
> extern CORE_ADDR hppa_read_pc (struct regcache *regcache);
> extern void hppa_write_pc (struct regcache *regcache, CORE_ADDR pc);
> extern CORE_ADDR hppa_unwind_pc (struct gdbarch *gdbarch,
> struct frame_info *next_frame);
>
> extern struct minimal_symbol *
> hppa_lookup_stub_minimal_symbol (const char *name,
> enum unwind_stub_types stub_type);
>
> extern struct hppa_objfile_private * hppa_init_objfile_priv_data (struct
> objfile
> *objfile);
>
> extern int hppa_in_solib_call_trampoline (struct gdbarch *gdbarch,
> CORE_ADDR pc, char *name);
> extern CORE_ADDR hppa_skip_trampoline_code (struct frame_info *, CORE_ADDR
> pc);
> <<<hppa-tdep.h>>>>
>
> So you can see that the ugly formatting, I proposed is already
> used twice.
> I found 37 occurrences listed below,
> should we considered those as badly formatted?
Indenting the function name with two spaces is what we traditionally
did for long prototypes. I think it is a perfectly fine solution for
the "problem" at hand.
next prev parent reply other threads:[~2011-03-19 17:32 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-12 2:17 GDB Administrator
2011-03-13 9:32 ` Pierre Muller
2011-03-13 10:24 ` [RFA] Fix ARI warning about function call in first column (was : New ARI warning Sat Mar 12 01:53:29 UTC 2011) Pierre Muller
2011-03-13 13:42 ` [RFA] Fix ARI warnings about function with no parameters ( " Pierre Muller
2011-03-14 16:03 ` Pierre Muller
2011-03-13 19:39 ` New ARI warning Sat Mar 12 01:53:29 UTC 2011 Eli Zaretskii
2011-03-14 11:26 ` Pierre Muller
2011-03-14 12:13 ` Eli Zaretskii
2011-03-14 12:34 ` Pedro Alves
2011-03-14 12:34 ` Eli Zaretskii
2011-03-14 12:49 ` Pierre Muller
2011-03-14 13:06 ` Eli Zaretskii
2011-03-14 12:51 ` Eli Zaretskii
2011-03-14 12:52 ` Pierre Muller
2011-03-14 13:16 ` Eli Zaretskii
2011-03-14 12:59 ` Pedro Alves
2011-03-14 13:27 ` Eli Zaretskii
2011-03-14 13:46 ` Pedro Alves
2011-03-14 15:46 ` Pierre Muller
2011-03-19 21:15 ` Mark Kettenis [this message]
[not found] ` <18667.385276831$1300008680@news.gmane.org>
2011-03-14 15:54 ` [RFA] Fix ARI warning about function call in first column Tom Tromey
2011-03-14 16:46 ` [RFA-v2] " Pierre Muller
2011-03-14 17:02 ` Tom Tromey
[not found] ` <001401cbe261$5490ec40$fdb2c4c0$%muller@ics-cnrs.unistra.fr>
2011-03-14 17:17 ` Eli Zaretskii
2011-03-14 17:26 ` Pierre Muller
[not found] ` <10281.0550401502$1300122152@news.gmane.org>
2011-03-14 17:39 ` Tom Tromey
2011-03-15 12:19 ` [RFA] Fix formatting in " Pierre Muller
[not found] ` <45563.9187516228$1300186224@news.gmane.org>
2011-03-15 15:42 ` Tom Tromey
2011-03-15 16:01 ` Pierre Muller
[not found] ` <002001cbe269$85ed0e60$91c72b20$%muller@ics-cnrs.unistra.fr>
2011-03-14 21:26 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201103191730.p2JHUnQk025106@glazunov.sibelius.xs4all.nl \
--to=mark.kettenis@xs4all.nl \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=pedro@codesourcery.com \
--cc=pierre.muller@ics-cnrs.unistra.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox