Re: [google] Check if the nonnull attribute is applied to 'this' (issue4446070)

2011-05-04 Thread Jason Merrill
On 05/04/2011 05:08 AM, Richard Guenther wrote: On Tue, May 3, 2011 at 10:10 PM,jason.merr...@gmail.com wrote: As I commented on the -Wnonnull patch, rather than complain about people getting the argument number wrong we should ignore 'this' (and other artificial parms) for attribute argument

Re: [google] Check if the nonnull attribute is applied to 'this' (issue4446070)

2011-05-02 Thread Jason Merrill
On 04/29/2011 04:08 PM, Basile Starynkevitch wrote: [...] which is also what I expect. I have no idea if it is conforming to standards. But I notice that the test about this is remaining in the code. So apparently GCC 4.6 does not make the hypothesis that this is never null, otherwise it would

[google] Check if the nonnull attribute is applied to 'this' (issue4446070)

2011-04-29 Thread Diego Novillo
This patch from Le-Chun Wu adds support to check whether a nonnull attribute is applied to 'this' pointer for non-static methods. OK for trunk? Applied to google/main 2011-04-27 Le-Chun Wu l...@google.com Google ref 45339. * c-common.c (handle_nonnull_attribute): Check

Re: [google] Check if the nonnull attribute is applied to 'this' (issue4446070)

2011-04-29 Thread Richard Guenther
On Fri, Apr 29, 2011 at 5:08 PM, Diego Novillo dnovi...@google.com wrote: This patch from Le-Chun Wu adds support to check whether a nonnull attribute is applied to 'this' pointer for non-static methods. OK for trunk?  Applied to google/main 2011-04-27  Le-Chun Wu  l...@google.com        

Re: [google] Check if the nonnull attribute is applied to 'this' (issue4446070)

2011-04-29 Thread dnovillo
On 2011/04/29 15:12:52, richard.guenther_gmail.com wrote: + spurious white-space change. Thanks. Fixed. Diego. http://codereview.appspot.com/4446070/

Re: [google] Check if the nonnull attribute is applied to 'this' (issue4446070)

2011-04-29 Thread Basile Starynkevitch
On Fri, 29 Apr 2011 11:08:24 -0400 (EDT) dnovi...@google.com (Diego Novillo) wrote: This patch from Le-Chun Wu adds support to check whether a nonnull attribute is applied to 'this' pointer for non-static methods. This bring me to a question. Does the C++ standard imply that this is never a

Re: [google] Check if the nonnull attribute is applied to 'this' (issue4446070)

2011-04-29 Thread Diego Novillo
On Fri, Apr 29, 2011 at 14:46, Basile Starynkevitch bas...@starynkevitch.net wrote: On Fri, 29 Apr 2011 11:08:24 -0400 (EDT) dnovi...@google.com (Diego Novillo) wrote: This patch from Le-Chun Wu adds support to check whether a nonnull attribute is applied to 'this' pointer for non-static

Re: [google] Check if the nonnull attribute is applied to 'this' (issue4446070)

2011-04-29 Thread Mike Stump
On Apr 29, 2011, at 11:46 AM, Basile Starynkevitch wrote: On Fri, 29 Apr 2011 11:08:24 -0400 (EDT) dnovi...@google.com (Diego Novillo) wrote: This patch from Le-Chun Wu adds support to check whether a nonnull attribute is applied to 'this' pointer for non-static methods. This bring me to

Re: [google] Check if the nonnull attribute is applied to 'this' (issue4446070)

2011-04-29 Thread Basile Starynkevitch
On Fri, 29 Apr 2011 12:32:24 -0700 Mike Stump mikest...@comcast.net wrote: On Apr 29, 2011, at 11:46 AM, Basile Starynkevitch wrote: This bring me to a question. Does the C++ standard imply that this is never a null pointer? Does this: 4 Certain other operations are described in

Re: [google] Check if the nonnull attribute is applied to 'this' (issue4446070)

2011-04-29 Thread Mike Stump
On Apr 29, 2011, at 1:08 PM, Basile Starynkevitch wrote: Not really. How's this then: http://stackoverflow.com/questions/2474018/when-does-invoking-a-member-function-on-a-null-instance-result-in-undefined-behav ? :-)