Re: [WIP PATCH] add object access attributes (PR 83859)

2019-11-19 Thread Richard Biener
On Mon, Nov 18, 2019 at 5:45 PM Martin Sebor wrote: > > On 11/18/19 1:36 AM, Richard Biener wrote: > > On Fri, Nov 15, 2019 at 10:28 PM Martin Sebor wrote: > >> > >> Thanks for the suggestion. I will do that for GCC 11. I take > >> Richard's point that the attributes' semantics need to be clear

Re: [WIP PATCH] add object access attributes (PR 83859)

2019-11-18 Thread Martin Sebor
On 11/18/19 1:36 AM, Richard Biener wrote: On Fri, Nov 15, 2019 at 10:28 PM Martin Sebor wrote: Thanks for the suggestion. I will do that for GCC 11. I take Richard's point that the attributes' semantics need to be clearly and carefully specified before they're put to use for optimization.

Re: [WIP PATCH] add object access attributes (PR 83859)

2019-11-18 Thread Richard Biener
On Fri, Nov 15, 2019 at 10:28 PM Martin Sebor wrote: > > Thanks for the suggestion. I will do that for GCC 11. I take > Richard's point that the attributes' semantics need to be clearly > and carefully specified before they're put to use for optimization. Before they are exposed to users please

Re: [WIP PATCH] add object access attributes (PR 83859)

2019-11-15 Thread Martin Sebor
On 10/27/19 11:31 AM, Jeff Law wrote: On 9/29/19 1:51 PM, Martin Sebor wrote: -Wstringop-overflow detects a subset of past-the-end read and write accesses by built-in functions such as memcpy and strcpy.  It relies on the functions' effects the knowledge of which is hardwired into GCC.  Although

Re: [WIP PATCH] add object access attributes (PR 83859)

2019-10-28 Thread Richard Biener
On Sun, Oct 27, 2019 at 6:32 PM Jeff Law wrote: > > On 9/29/19 1:51 PM, Martin Sebor wrote: > > -Wstringop-overflow detects a subset of past-the-end read and write > > accesses by built-in functions such as memcpy and strcpy. It relies > > on the functions' effects the knowledge of which is hardw

Re: [WIP PATCH] add object access attributes (PR 83859)

2019-10-27 Thread Jeff Law
On 9/29/19 1:51 PM, Martin Sebor wrote: > -Wstringop-overflow detects a subset of past-the-end read and write > accesses by built-in functions such as memcpy and strcpy.  It relies > on the functions' effects the knowledge of which is hardwired into > GCC.  Although it's possible for users to creat

[PING 2] [WIP PATCH] add object access attributes (PR 83859)

2019-10-24 Thread Martin Sebor
Ping: https://gcc.gnu.org/ml/gcc-patches/2019-09/msg01690.html On 10/17/2019 10:28 AM, Martin Sebor wrote: Ping: https://gcc.gnu.org/ml/gcc-patches/2019-09/msg01690.html Other than the suggestions I got for optimization (for GCC 11) and additional buffer overflow detection for [static] arrays),

[PING] [WIP PATCH] add object access attributes (PR 83859)

2019-10-17 Thread Martin Sebor
Ping: https://gcc.gnu.org/ml/gcc-patches/2019-09/msg01690.html Other than the suggestions I got for optimization (for GCC 11) and additional buffer overflow detection for [static] arrays), is there any feedback on the patch itself? Jeff? Martin On 9/29/19 1:51 PM, Martin Sebor wrote: -Wstring

Re: [WIP PATCH] add object access attributes (PR 83859)

2019-09-30 Thread Martin Sebor
On 9/30/19 3:34 PM, Joseph Myers wrote: On Sun, 29 Sep 2019, Martin Sebor wrote: PR 83859 asks to expose the same checking that GCC does natively for built-in calls via a function attribute that associates a pointer argument with the size argument, such as: I'll also note that, as mentioned i

Re: [WIP PATCH] add object access attributes (PR 83859)

2019-09-30 Thread Joseph Myers
On Sun, 29 Sep 2019, Martin Sebor wrote: > PR 83859 asks to expose the same checking that GCC does natively for > built-in calls via a function attribute that associates a pointer > argument with the size argument, such as: I'll also note that, as mentioned in that bug (but more specifically cov

Re: [WIP PATCH] add object access attributes (PR 83859)

2019-09-30 Thread Martin Sebor
On 9/30/19 1:37 AM, Richard Biener wrote: On Sun, Sep 29, 2019 at 9:52 PM Martin Sebor wrote: -Wstringop-overflow detects a subset of past-the-end read and write accesses by built-in functions such as memcpy and strcpy. It relies on the functions' effects the knowledge of which is hardwired i

Re: [WIP PATCH] add object access attributes (PR 83859)

2019-09-30 Thread Richard Biener
On Sun, Sep 29, 2019 at 9:52 PM Martin Sebor wrote: > > -Wstringop-overflow detects a subset of past-the-end read and write > accesses by built-in functions such as memcpy and strcpy. It relies > on the functions' effects the knowledge of which is hardwired into > GCC. Although it's possible for

[WIP PATCH] add object access attributes (PR 83859)

2019-09-29 Thread Martin Sebor
-Wstringop-overflow detects a subset of past-the-end read and write accesses by built-in functions such as memcpy and strcpy. It relies on the functions' effects the knowledge of which is hardwired into GCC. Although it's possible for users to create wrappers for their own functions to detect si