Re: CVS commit: src/sys/compat/sys

2018-06-15 Thread Valery Ushakov
On Fri, Jun 15, 2018 at 17:11:49 +0300, Valery Ushakov wrote: > It seems that with restrict we can just memset the whole struct and > the compiler will elide the memset completely when there's no pad to > scrub. Alas, with the real code the compiler cannot elide the memset. :( -uwe

Re: CVS commit: src/sys/compat/sys

2018-06-15 Thread Valery Ushakov
On Fri, Jun 15, 2018 at 19:55:28 +0700, Robert Elz wrote: > Date:Fri, 15 Jun 2018 12:41:56 +0300 > From:Valery Ushakov > Message-ID: <20180615094156.gd3...@pony.stderr.spb.ru> > > | Re memset - I now wonder if > | compiler is even allowed to be smart here b/c

Re: CVS commit: src/sys/compat/sys

2018-06-15 Thread Robert Elz
Date:Fri, 15 Jun 2018 12:41:56 +0300 From:Valery Ushakov Message-ID: <20180615094156.gd3...@pony.stderr.spb.ru> | Re memset - I now wonder if | compiler is even allowed to be smart here b/c strict aliasing Another way would be static const struct

Re: CVS commit: src/sys/compat/sys

2018-06-15 Thread Valery Ushakov
On Fri, Jun 15, 2018 at 18:05:29 +1000, matthew green wrote: > "Robert Elz" writes: > > Module Name:src > > Committed By: kre > > Date: Fri Jun 15 07:46:59 UTC 2018 > > > > Modified Files: > > src/sys/compat/sys: time_types.h > > > > Log Message: > > If we are

re: CVS commit: src/sys/compat/sys

2018-06-15 Thread matthew green
"Robert Elz" writes: > Module Name: src > Committed By: kre > Date: Fri Jun 15 07:46:59 UTC 2018 > > Modified Files: > src/sys/compat/sys: time_types.h > > Log Message: > If we are going to use offsetof() we'd need to include to > get it defined. Rather than deal with potential