This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] gcc/dwarf2asm.c: Add static_output_delta() with var_list for dw2_asm_output_delta()
- From: "Bin.Cheng" <amker dot cheng at gmail dot com>
- To: Chen Gang <gang dot chen dot 5i5j at gmail dot com>
- Cc: "Joseph S. Myers" <joseph at codesourcery dot com>, rth at redhat dot com, "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>, Jeff Law <law at redhat dot com>, davem at redhat dot com
- Date: Mon, 16 Jun 2014 09:36:49 +0800
- Subject: Re: [PATCH] gcc/dwarf2asm.c: Add static_output_delta() with var_list for dw2_asm_output_delta()
- Authentication-results: sourceware.org; auth=none
- References: <539C19B3 dot 6090004 at gmail dot com> <539C1AD0 dot 4010208 at gmail dot com>
On Sat, Jun 14, 2014 at 5:50 PM, Chen Gang <gang.chen.5i5j@gmail.com> wrote:
> On 06/14/2014 05:45 PM, 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 | 23 +++++++++++++++--------
>> 2 files changed, 21 insertions(+), 8 deletions(-)
>>
>> diff --git a/gcc/ChangeLog b/gcc/ChangeLog
>> index edb3fc0..0e1df0e 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 static_output_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..69733b3 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
>> +static_output_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,18 @@ dw2_asm_output_delta (int size, const char *lab1, const char *lab2,
>> vfprintf (asm_out_file, comment, ap);
>> }
>> fputc ('\n', asm_out_file);
>> +}
>> +
>>
>> +
>
> Oh, sorry, it contents 2 new redundant '\n', if necessary to send patch
> v2 for it, please let me know.
>
>
> Thanks.
> --
> Chen Gang
>
> Open, share, and attitude like air, water, and life which God blessed
Hi,
Please send patches to gcc-patches mailing list.
Thanks,
bin
--
Best Regards.