[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: restrict

From: Jeffrey Walton
Subject: Re: restrict
Date: Mon, 10 Feb 2020 03:39:23 -0500

On Sun, Feb 9, 2020 at 10:03 PM Bruno Haible <address@hidden> wrote:
> ...
> Which function declarations could therefore profit from the 'restrict'
> keyword?

[SNIP ...]

I think the case of interest is subobjects of arrays:

    char a[] = "Hello World";
    char* b = a+5;

memcpy(a,b,5) would get you in trouble due to restrict. memmov(a,b,5)
would be OK.

Punning might be another interesting case, like the way the internet
functions seem to cast everything to byte arrays.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]