Talk:Restrict/Archive 1

Declaration of intent only?
Is this the programmer telling the compiler "I won't point there twice. So assume I don't." or "I don't want to point there twice. Check and make sure that I don't."? --84.62.198.149 23:34, 2 June 2007 (UTC)
 * The former. This check is impossible to do in general at compile time (if it were possible, the "restrict" keyword wouldn't be necessary in the first place) and C just doesn't have any such thing as a run-time check (environments are free to provide them, but the standard never requires them, leaving all the situations were they would be required as undefined behavior). 82.95.254.249 (talk) 21:50, 20 November 2007 (UTC)

load R3 ← *ptrA
I'm new to restrict, but is  supposed to be   in... ? Also, is. Qwertyus (talk) 22:39, 16 February 2011 (UTC)


 * No, it is a good example. Because of the documented behavior of memcpy, it is acceptable to mark the arguments with restrict. This is not redundant at all, except for the fact that standard functions like memcpy are specially recognized by compilers. (so the compiler already knows that memcpy should have restrict) If you wrote your own my_mem_copy function, it wouldn't be special and the compiler wouldn't know unless you used restrict. 208.118.25.22 (talk) 01:30, 20 January 2013 (UTC)