Re: [PATCH] Avoid duplicate -Wnonnull warnings (PR c++/28656)

2012-07-20 Thread Richard Guenther
On Fri, Jul 20, 2012 at 11:04 AM, Jakub Jelinek wrote: > On Fri, Jul 20, 2012 at 10:37:32AM +0200, Richard Guenther wrote: >> On Thu, Jul 19, 2012 at 6:53 PM, Jakub Jelinek wrote: >> Hum. How hard would it be to merge the attributes? > > IMHO hard and ugly. The thing is that you probably can do

Re: [PATCH] Avoid duplicate -Wnonnull warnings (PR c++/28656)

2012-07-20 Thread Jakub Jelinek
On Fri, Jul 20, 2012 at 10:37:32AM +0200, Richard Guenther wrote: > On Thu, Jul 19, 2012 at 6:53 PM, Jakub Jelinek wrote: > Hum. How hard would it be to merge the attributes? IMHO hard and ugly. The thing is that you probably can do some hacks easily in handle_nonnull_attribute, so that multipl

Re: [PATCH] Avoid duplicate -Wnonnull warnings (PR c++/28656)

2012-07-20 Thread Richard Guenther
On Thu, Jul 19, 2012 at 6:53 PM, Jakub Jelinek wrote: > Hi! > > On the following testcase we emit various (correct) -Wnonnull warnings > more than once, sometimes many times. The problem on the reported memcpy > testcase is that glibc uses __attribute__((nonnull (1, 2))) and gcc > uses __attribut

[PATCH] Avoid duplicate -Wnonnull warnings (PR c++/28656)

2012-07-19 Thread Jakub Jelinek
Hi! On the following testcase we emit various (correct) -Wnonnull warnings more than once, sometimes many times. The problem on the reported memcpy testcase is that glibc uses __attribute__((nonnull (1, 2))) and gcc uses __attribute__((nonnull)) on the memset builtin and we end up with both of th