Re: [C PATCH] Prevent -Wunused-value warning with __atomic_fetch_* (PR c/69407)

2016-03-19 Thread Jeff Law
On 03/14/2016 05:48 AM, Marek Polacek wrote: Ping. On Fri, Mar 04, 2016 at 07:03:09PM +0100, Marek Polacek wrote: On Fri, Mar 04, 2016 at 06:41:26PM +0100, Jakub Jelinek wrote: I'm ok with it for gcc6. Cool. But IMHO you should add dg-bogus directives here. Ok, version with dg-bogus: Bo

Re: [C PATCH] Prevent -Wunused-value warning with __atomic_fetch_* (PR c/69407)

2016-03-19 Thread Uros Bizjak
On Mon, Mar 7, 2016 at 2:34 PM, Marek Polacek wrote: > On Fri, Mar 04, 2016 at 07:17:46PM +0100, Uros Bizjak wrote: >> Hello! >> >> > This is not a regression but I thought I'd post this anyway. Martin >> > reported >> > that we generate -Wunused-value warnings on the attached testcase, which >>

Re: [C PATCH] Prevent -Wunused-value warning with __atomic_fetch_* (PR c/69407)

2016-03-18 Thread Uros Bizjak
On Fri, Mar 18, 2016 at 4:33 PM, Uros Bizjak wrote: > On Mon, Mar 7, 2016 at 2:34 PM, Marek Polacek wrote: >> On Fri, Mar 04, 2016 at 07:17:46PM +0100, Uros Bizjak wrote: >>> Hello! >>> >>> > This is not a regression but I thought I'd post this anyway. Martin >>> > reported >>> > that we genera

Re: [C PATCH] Prevent -Wunused-value warning with __atomic_fetch_* (PR c/69407)

2016-03-14 Thread Marek Polacek
Ping. On Fri, Mar 04, 2016 at 07:03:09PM +0100, Marek Polacek wrote: > On Fri, Mar 04, 2016 at 06:41:26PM +0100, Jakub Jelinek wrote: > > I'm ok with it for gcc6. > > Cool. > > > But IMHO you should add dg-bogus directives here. > > Ok, version with dg-bogus: > > Bootstrapped/regtested on x86_

Re: [C PATCH] Prevent -Wunused-value warning with __atomic_fetch_* (PR c/69407)

2016-03-07 Thread Marek Polacek
On Fri, Mar 04, 2016 at 07:17:46PM +0100, Uros Bizjak wrote: > Hello! > > > This is not a regression but I thought I'd post this anyway. Martin > > reported > > that we generate -Wunused-value warnings on the attached testcase, which > > arguable doesn't make sense. Setting TREE_USED suppresses

Re: [C PATCH] Prevent -Wunused-value warning with __atomic_fetch_* (PR c/69407)

2016-03-07 Thread Marek Polacek
On Fri, Mar 04, 2016 at 07:19:56PM +0100, Jakub Jelinek wrote: > > --- gcc/c-family/c-common.c > > +++ gcc/c-family/c-common.c > > @@ -11443,6 +11443,10 @@ resolve_overloaded_builtin (location_t loc, tree > > function, > > && orig_code != BUILT_IN_ATOMIC_STORE_N) > > result = sync_re

Re: [C PATCH] Prevent -Wunused-value warning with __atomic_fetch_* (PR c/69407)

2016-03-04 Thread Jakub Jelinek
On Fri, Mar 04, 2016 at 07:03:09PM +0100, Marek Polacek wrote: > Ok, version with dg-bogus: > > Bootstrapped/regtested on x86_64-linux, ok for trunk? > > 2016-03-04 Marek Polacek > > PR c/69407 > * c-common.c (resolve_overloaded_builtin): Set TREE_USED for the fetch > operat

Re: [C PATCH] Prevent -Wunused-value warning with __atomic_fetch_* (PR c/69407)

2016-03-04 Thread Uros Bizjak
Hello! > This is not a regression but I thought I'd post this anyway. Martin reported > that we generate -Wunused-value warnings on the attached testcase, which > arguable doesn't make sense. Setting TREE_USED suppresses the warning. Since > we already compute 'fetch_op' I used that. (This war

Re: [C PATCH] Prevent -Wunused-value warning with __atomic_fetch_* (PR c/69407)

2016-03-04 Thread Marek Polacek
On Fri, Mar 04, 2016 at 06:41:26PM +0100, Jakub Jelinek wrote: > I'm ok with it for gcc6. Cool. > But IMHO you should add dg-bogus directives here. Ok, version with dg-bogus: Bootstrapped/regtested on x86_64-linux, ok for trunk? 2016-03-04 Marek Polacek PR c/69407 * c-commo

Re: [C PATCH] Prevent -Wunused-value warning with __atomic_fetch_* (PR c/69407)

2016-03-04 Thread Jakub Jelinek
On Fri, Mar 04, 2016 at 06:30:40PM +0100, Marek Polacek wrote: > This is not a regression but I thought I'd post this anyway. Martin reported > that we generate -Wunused-value warnings on the attached testcase, which > arguable doesn't make sense. Setting TREE_USED suppresses the warning. Since

[C PATCH] Prevent -Wunused-value warning with __atomic_fetch_* (PR c/69407)

2016-03-04 Thread Marek Polacek
This is not a regression but I thought I'd post this anyway. Martin reported that we generate -Wunused-value warnings on the attached testcase, which arguable doesn't make sense. Setting TREE_USED suppresses the warning. Since we already compute 'fetch_op' I used that. (This warning doesn't tri