Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: qinwei<qinwei@sunnorth.com.cn>
To: Jim Blandy <jimb@codesourcery.com>
Cc: gdb-patches@sourceware.org
Subject: Re: RFA: score-tdep.c: avoid mixed declarations and statements
Date: Tue, 09 Jan 2007 03:38:00 -0000	[thread overview]
Message-ID: <OFDD05FD9E.4EA4056E-ON4825725E.0013D3F8-4825725E.0013EB3D@sunnorth.com.cn> (raw)
In-Reply-To: <m364bh9l3q.fsf@codesourcery.com>

> We recently added -Wdeclaration-after-statement to GDB's set of build
> warnings, which caught the new S+core port.
> 
> Okay to commit?
> 
> gdb/ChangeLog:
> 2007-01-08  Jim Blandy  <jimb@codesourcery.com>
> 
>    * score-tdep.c (score_push_dummy_call): Don't mix declarations and
>    statements.
> 
> ? gdb/autom4te.cache
> Index: gdb/score-tdep.c
> ===================================================================
> RCS file: /cvs/src/src/gdb/score-tdep.c,v
> retrieving revision 1.1
> diff -u -p -r1.1 score-tdep.c
> --- gdb/score-tdep.c   4 Jan 2007 07:09:54 -0000   1.1
> +++ gdb/score-tdep.c   8 Jan 2007 22:57:33 -0000
> @@ -435,14 +435,15 @@ score_push_dummy_call (struct gdbarch *g
>      {
>        struct value *arg = args[argnum];
>        struct type *arg_type = check_typedef (value_type (arg));
> -      arglen = TYPE_LENGTH (arg_type);
>        enum type_code typecode = TYPE_CODE (arg_type);
>        const gdb_byte *val = value_contents (arg);
>        int downward_offset = 0;
> +      int odd_sized_struct_p;
> +      int arg_last_part_p = 0;
> 
> -      int odd_sized_struct_p = (arglen > SCORE_REGSIZE
> +      arglen = TYPE_LENGTH (arg_type);
> +      odd_sized_struct_p = (arglen > SCORE_REGSIZE
>                                  && arglen % SCORE_REGSIZE != 0);
> -      int arg_last_part_p = 0;
> 
>        /* If a arg should be aligned to 8 bytes (long long or double),
>           the value should be put to even register numbers.  */

OK.

Best regards,
Qinwei
Mail  qinwei@sunnorth.com.cn
Phone +86-010-62981668-2708
Fax   +86-010-62985972


  parent reply	other threads:[~2007-01-09  3:38 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-08 23:03 Jim Blandy
2007-01-08 23:13 ` Daniel Jacobowitz
2007-01-09  3:38 ` qinwei [this message]
2007-01-09 21:25   ` Jim Blandy
2007-01-09 10:04 ` Mark Kettenis

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=OFDD05FD9E.4EA4056E-ON4825725E.0013D3F8-4825725E.0013EB3D@sunnorth.com.cn \
    --to=qinwei@sunnorth.com.cn \
    --cc=gdb-patches@sourceware.org \
    --cc=jimb@codesourcery.com \
    /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