Re: Apply function attributes (e.g., [[gnu::access()]]) to pointees too

2024-07-12 Thread Alejandro Colomar via Gcc
Hi Martin, On Thu, Jul 11, 2024 at 06:34:04PM GMT, Alejandro Colomar wrote: > Hi Martin, David, > > On Thu, Jul 11, 2024 at 06:08:38PM GMT, David Brown wrote: > > On 11/07/2024 11:58, Martin Uecker via Gcc wrote: > > > > [[gnu::access(read_write, 1)]] > > > > [[gnu::access(read_on

Re: Apply function attributes (e.g., [[gnu::access()]]) to pointees too

2024-07-11 Thread Alejandro Colomar via Gcc
Hi Martin, David, On Thu, Jul 11, 2024 at 06:08:38PM GMT, David Brown wrote: > On 11/07/2024 11:58, Martin Uecker via Gcc wrote: > > > [[gnu::access(read_write, 1)]] > > > [[gnu::access(read_only, 2)]] > > > [[gnu::nonnull(1, 2)]] > > > [[gnu::null_terminated_string_arg(2)]] > > > char *

Re: Apply function attributes (e.g., [[gnu::access()]]) to pointees too

2024-07-11 Thread David Brown via Gcc
On 11/07/2024 11:58, Martin Uecker via Gcc wrote: Am Donnerstag, dem 11.07.2024 um 11:35 +0200 schrieb Alejandro Colomar via Gcc: Hi, I was wondering how we could extend attributes such as gnu::access() to apply it to pointees too. Currently, there's no way to specify the access mode of a poi

Re: Apply function attributes (e.g., [[gnu::access()]]) to pointees too

2024-07-11 Thread Martin Uecker via Gcc
Am Donnerstag, dem 11.07.2024 um 11:35 +0200 schrieb Alejandro Colomar via Gcc: > Hi, > > I was wondering how we could extend attributes such as gnu::access() to > apply it to pointees too. Currently, there's no way to specify the > access mode of a pointee. > > Let's take for example strsep(3