public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Chen Gang <gang.chen.5i5j@gmail.com>
To: "Joseph S. Myers" <joseph@codesourcery.com>, rth@redhat.com
Cc: gcc-patches@gcc.gnu.org, davem@redhat.com,
	Jeff Law <law@redhat.com>,  "Bin.Cheng" <amker.cheng@gmail.com>,
	Guenter Roeck <linux@roeck-us.net>
Subject: Re: [PATCH v2] gcc/dwarf2asm.c: Add dw2_asm_voutput_delta() with var_list for dw2_asm_output_delta()
Date: Wed, 25 Jun 2014 22:26:00 -0000	[thread overview]
Message-ID: <53AB4C73.9040805@gmail.com> (raw)
In-Reply-To: <539F9349.6090902@gmail.com>

Hello maintainers:

Please help check this patch when you have time, thanks.

BTW: one linux kernel member found a gcc issue for the latest version
(4.10.0 20140622 or later), but for old version (e.g. 4.10.0 2014060*),
it is OK. It is my chance to fix it (hope can finish within 2014-06-30).

Also sorry for I have lost a chance to fix a issue about h8300, because
it is never used for linux main line, it is beyond my border (I have no
enough time resource on it), at present.

Thanks.

On 06/17/2014 09:00 AM, Chen Gang wrote:
> dw2_asm_output_vms_delta() calls dw2_asm_output_delta() in an abnormal
> way, so need add a new function just like vprintf() for printf(), and
> then the related call will be in normal way.
> 
> The related warning:
> 
>   ../../gcc/gcc/dwarf2asm.c: In function ‘void dw2_asm_output_vms_delta(int, const char*, const char*, const char*, ...)’:
>   ../../gcc/gcc/dwarf2asm.c:167:50: warning: format not a string literal and no format arguments [-Wformat-security]
> 
> 
> Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
> ---
>  gcc/ChangeLog   |  6 ++++++
>  gcc/dwarf2asm.c | 21 +++++++++++++--------
>  2 files changed, 19 insertions(+), 8 deletions(-)
> 
> diff --git a/gcc/ChangeLog b/gcc/ChangeLog
> index edb3fc0..01a1cc1 100644
> --- a/gcc/ChangeLog
> +++ b/gcc/ChangeLog
> @@ -1,3 +1,9 @@
> +2014-06-14  Chen Gang <gang.chen.5i5j@gmail.com>
> +
> +	* dwarf2asm.c (dw2_asm_output_delta): Add dw2_asm_voutput_delta() for
> +	dw2_asm_output_delta(), just like vprintf() for printf(), so that
> +	dw2_asm_output_vms_delta() can use it in normal way.
> +
>  2014-06-13  Vladimir Makarov  <vmakarov@redhat.com>
>  
>  	* lra-assign.c (assign_by_spills): Add code to assign vector regs
> diff --git a/gcc/dwarf2asm.c b/gcc/dwarf2asm.c
> index 1372b23..376b939 100644
> --- a/gcc/dwarf2asm.c
> +++ b/gcc/dwarf2asm.c
> @@ -123,14 +123,10 @@ dw2_asm_output_data (int size, unsigned HOST_WIDE_INT value,
>     impossible to do here, since the ASM_SET_OP for the difference
>     symbol must appear after both symbols are defined.  */
>  
> -void
> -dw2_asm_output_delta (int size, const char *lab1, const char *lab2,
> -		      const char *comment, ...)
> +static void
> +dw2_asm_voutput_delta (int size, const char *lab1, const char *lab2,
> +		      const char *comment, va_list ap)
>  {
> -  va_list ap;
> -
> -  va_start (ap, comment);
> -
>  #ifdef ASM_OUTPUT_DWARF_DELTA
>    ASM_OUTPUT_DWARF_DELTA (asm_out_file, size, lab1, lab2);
>  #else
> @@ -145,7 +141,16 @@ dw2_asm_output_delta (int size, const char *lab1, const char *lab2,
>        vfprintf (asm_out_file, comment, ap);
>      }
>    fputc ('\n', asm_out_file);
> +}
>  
> +void
> +dw2_asm_output_delta (int size, const char *lab1, const char *lab2,
> +		      const char *comment, ...)
> +{
> +  va_list ap;
> +
> +  va_start (ap, comment);
> +  dw2_asm_voutput_delta (size, lab1, lab2, comment, ap);
>    va_end (ap);
>  }
>  
> @@ -164,7 +169,7 @@ dw2_asm_output_vms_delta (int size ATTRIBUTE_UNUSED,
>  #ifndef ASM_OUTPUT_DWARF_VMS_DELTA
>    /* VMS Delta is only special on ia64-vms, but this function also gets
>       called on alpha-vms so it has to do something sane.  */
> -  dw2_asm_output_delta (size, lab1, lab2, comment);
> +  dw2_asm_voutput_delta (size, lab1, lab2, comment, ap);
>  #else
>    ASM_OUTPUT_DWARF_VMS_DELTA (asm_out_file, size, lab1, lab2);
>    if (flag_debug_asm && comment)
> 


-- 
Chen Gang

Open share and attitude like air water and life which God blessed

  reply	other threads:[~2014-06-25 22:26 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-06-17  1:01 Chen Gang
2014-06-25 22:26 ` Chen Gang [this message]
2014-06-27  5:51   ` Chen Gang

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=53AB4C73.9040805@gmail.com \
    --to=gang.chen.5i5j@gmail.com \
    --cc=amker.cheng@gmail.com \
    --cc=davem@redhat.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=joseph@codesourcery.com \
    --cc=law@redhat.com \
    --cc=linux@roeck-us.net \
    --cc=rth@redhat.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).