Re: [PATCH] Increment value instead of a pointer in ADA macro processing.

2017-03-09 Thread Martin Liška
On 03/08/2017 09:03 AM, Eric Botcazou wrote:
>> I prepared quite obvious fix for that and tested make check -k
>> RUNTESTFLAGS="dg.exp=dump-ada-spec-*" on x86_64-linux-gnu.
> 
> Thanks for spotting and fixing it.  Please put the fix on the 6 branch too.
> 

Yes, I'll add the patch when I'll test pending back-ports I have.
Martin


Re: [PATCH] Increment value instead of a pointer in ADA macro processing.

2017-03-08 Thread Eric Botcazou
> I prepared quite obvious fix for that and tested make check -k
> RUNTESTFLAGS="dg.exp=dump-ada-spec-*" on x86_64-linux-gnu.

Thanks for spotting and fixing it.  Please put the fix on the 6 branch too.

-- 
Eric Botcazou


Re: [PATCH] Increment value instead of a pointer in ADA macro processing.

2017-03-07 Thread Jeff Law

On 03/07/2017 03:30 AM, Martin Liška wrote:

Hello.

Looks there's real issues spotted by -Wchkp:

../../gcc/c-family/c-ada-spec.c: In function ‘void print_ada_macros.chkp(pretty_printer*, 
\xe2\x80\x98pointer_bounds_typ\xe2\x80\x99 not supported by dump_type#, 
cpp_hashnode**, \xe2\x80\x98pointer_bounds_typ\xe2\x80\x99 not supported by 
dump_type#, int, void, ...)’:
../../gcc/c-family/c-ada-spec.c:80:15: error: memory access check always fail 
[-Werror=chkp]
*param_len += NODE_LEN (param);
~~~^~~~
../../gcc/c-family/c-ada-spec.c:80:15: error: memory access check always fail 
[-Werror=chkp]
../../gcc/c-family/c-ada-spec.c:84:19: error: memory access check always fail 
[-Werror=chkp]
*param_len += 2;  /* ", " */
~~~^~~~
../../gcc/c-family/c-ada-spec.c:84:19: error: memory access check always fail 
[-Werror=chkp]
../../gcc/c-family/c-ada-spec.c:92:18: error: memory access check always fail 
[-Werror=chkp]
   *param_len += 2;  /* ")\0" */
   ~~~^~~~
../../gcc/c-family/c-ada-spec.c:92:18: error: memory access check always fail 
[-Werror=chkp]

I prepared quite obvious fix for that and tested make check -k 
RUNTESTFLAGS="dg.exp=dump-ada-spec-*"
on x86_64-linux-gnu.

Ready to be installed?
Martin


0001-Increment-value-instead-of-a-pointer-in-ADA-macro-pr.patch


From 9137ddcf413585f557c4ef263d731bf457cb79f4 Mon Sep 17 00:00:00 2001
From: marxin 
Date: Tue, 7 Mar 2017 11:10:30 +0100
Subject: [PATCH] Increment value instead of a pointer in ADA macro processing.

gcc/c-family/ChangeLog:

2017-03-07  Martin Liska  

* c-ada-spec.c (macro_length): Increment value instead of a pointer.

OK.

Jeff