WG14 paper for removing restrict from nptr in strtol(3)
Alejandro Colomar
alx@kernel.org
Mon Jul 8 20:17:50 GMT 2024
Hi Martin,
On Mon, Jul 08, 2024 at 06:05:08PM GMT, Martin Uecker wrote:
> Am Montag, dem 08.07.2024 um 17:01 +0200 schrieb Alejandro Colomar:
> > On Mon, Jul 08, 2024 at 10:30:48AM GMT, David Malcolm wrote:
>
> ...
> > And then have it mean something strict, such as: The object pointed to
> > by the pointer is not pointed to by any other pointer; period.
> >
> > This definition is already what -Wrestrict seems to understand.
>
> One of the main uses of restrict is scientific computing. In this
> context such a definition of "restrict" would not work for many
> important use cases. But I agree that for warning purposes the
> definition of "restrict" in ISO C is not helpful.
Do you have some examples of functions where this matters and is
important? I'm curious to see them. Maybe we find some alternative.
> > > Has the C standard clarified the meaning of 'restrict' since that
> > > discussion? Without that, I wasn't planning to touch 'restrict' in
> > > GCC's -fanalyzer.
> >
> > Meh; no they didn't.
>
> There were examples added in C23 and there are now several papers
> being under discussion.
Hmm, yeah, the examples help with the formal definition. I was thinking
of the definition itself, which I still find quite confusing. :-)
Have a lovely night!
Alex
--
<https://www.alejandro-colomar.es/>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/libc-alpha/attachments/20240708/8aec2c1c/attachment.sig>
More information about the Libc-alpha
mailing list