Re: [PATCH v2] Refactor to avoid nonnull checks on "this" pointer.

2016-04-01 Thread Peter Foley
On Fri, Apr 1, 2016 at 11:10 AM, Corinna Vinschen wrote: > As I mentioned in my first reply, I'd prefer if the callers check the > pointer explicitly. Changing the methods to static methods seems ... > wrong. Ugly, if you don't mind me saying so. Fair enough, I'll respin this at some point.

Re: [PATCH v2] Refactor to avoid nonnull checks on "this" pointer.

2016-04-01 Thread Corinna Vinschen
On Apr 1 09:34, Peter Foley wrote: > On Fri, Apr 1, 2016 at 9:12 AM, Yaakov Selkowitz > wrote: > > See https://gcc.gnu.org/gcc-6/porting_to.html, section named "Optimizations > > remove null pointer checks for this". > > If there's an better way to do this, I'm all ears. As I mentioned in my f

Re: [PATCH v2] Refactor to avoid nonnull checks on "this" pointer.

2016-04-01 Thread Corinna Vinschen
On Apr 1 08:12, Yaakov Selkowitz wrote: > On 2016-04-01 07:13, Corinna Vinschen wrote: > >On Mar 31 12:18, Peter Foley wrote: > >>G++ 6.0 asserts that the "this" pointer is non-null for member functions. > >>Refactor methods that check if this is non-null to be static where > >>necessary, and remo

Re: [PATCH v2] Refactor to avoid nonnull checks on "this" pointer.

2016-04-01 Thread Peter Foley
On Fri, Apr 1, 2016 at 9:12 AM, Yaakov Selkowitz wrote: > See https://gcc.gnu.org/gcc-6/porting_to.html, section named "Optimizations > remove null pointer checks for this". If there's an better way to do this, I'm all ears. However, it seems to come down to either making these methods static or

Re: [PATCH v2] Refactor to avoid nonnull checks on "this" pointer.

2016-04-01 Thread Yaakov Selkowitz
On 2016-04-01 07:13, Corinna Vinschen wrote: On Mar 31 12:18, Peter Foley wrote: G++ 6.0 asserts that the "this" pointer is non-null for member functions. Refactor methods that check if this is non-null to be static where necessary, and remove the check where it is unnecessary. No, sorry, but

Re: [PATCH v2] Refactor to avoid nonnull checks on "this" pointer.

2016-04-01 Thread Corinna Vinschen
On Mar 31 12:18, Peter Foley wrote: > G++ 6.0 asserts that the "this" pointer is non-null for member functions. > Refactor methods that check if this is non-null to be static where > necessary, and remove the check where it is unnecessary. No, sorry, but now. Converting all affected functions to

[PATCH v2] Refactor to avoid nonnull checks on "this" pointer.

2016-03-31 Thread Peter Foley
G++ 6.0 asserts that the "this" pointer is non-null for member functions. Refactor methods that check if this is non-null to be static where necessary, and remove the check where it is unnecessary. winsup/cygwin/ChangeLog external.cc (cygwin_internal): Call _pinfo::cmdline staticly cygheap.h (fcwd