Re: [PATCH] Fix up compound literal handling in C FE (PR sanitizer/84307)

2018-02-26 Thread Jakub Jelinek
On Mon, Feb 26, 2018 at 11:00:48AM +0100, Martin Liška wrote: > On 02/14/2018 11:03 PM, Joseph Myers wrote: > > On Wed, 14 Feb 2018, Jakub Jelinek wrote: > > > >> 2018-02-13 Jakub Jelinek > >> > >>PR sanitizer/84340 > >>* c-decl.c (build_compound_literal): Call

Re: [PATCH] Fix up compound literal handling in C FE (PR sanitizer/84307)

2018-02-26 Thread Martin Liška
On 02/26/2018 11:04 AM, Jakub Jelinek wrote: > On Mon, Feb 26, 2018 at 11:00:48AM +0100, Martin Liška wrote: >> On 02/14/2018 11:03 PM, Joseph Myers wrote: >>> On Wed, 14 Feb 2018, Jakub Jelinek wrote: >>> 2018-02-13 Jakub Jelinek PR sanitizer/84340 *

Re: [PATCH] Fix up compound literal handling in C FE (PR sanitizer/84307)

2018-02-26 Thread Martin Liška
On 02/14/2018 11:03 PM, Joseph Myers wrote: > On Wed, 14 Feb 2018, Jakub Jelinek wrote: > >> 2018-02-13 Jakub Jelinek >> >> PR sanitizer/84340 >> * c-decl.c (build_compound_literal): Call pushdecl (decl) even when >> it is not TREE_STATIC. >> * c-typeck.c

Re: [PATCH] Fix up compound literal handling in C FE (PR sanitizer/84307)

2018-02-14 Thread Joseph Myers
On Wed, 14 Feb 2018, Jakub Jelinek wrote: > 2018-02-13 Jakub Jelinek > > PR sanitizer/84340 > * c-decl.c (build_compound_literal): Call pushdecl (decl) even when > it is not TREE_STATIC. > * c-typeck.c (c_mark_addressable) : Mark > not just the

[PATCH] Fix up compound literal handling in C FE (PR sanitizer/84307)

2018-02-14 Thread Jakub Jelinek
On Tue, Feb 13, 2018 at 03:40:20PM +0100, Jakub Jelinek wrote: > BTW, your testcase shows a more severe problem, that we actually don't > handle compound literals correctly. > > C99 says that: > "If the compound literal occurs outside the body of a function, the object > has static storage