This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug tree-optimization/67705] incorrect restrict interpretation


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67705

--- Comment #1 from Marc Glisse <glisse at gcc dot gnu.org> ---
Isn't that an old document? At least, I don't reach the same conclusions as you
do using the C11 wording:

1 Let D be a declaration of an ordinary identifier that provides a means of
designating an object P as a restrict-qualified pointer to type T.
2 If D appears inside a block and does not have storage class extern, let B
denote the block. If D appears in the list of parameter declarations of a
function definition, let B denote the associated block. Otherwise, let B denote
the block of main (or the block of whatever function is called at program
startup in a freestanding environment).
3 In what follows, a pointer expression E is said to be based on object P if
(at some sequence point in the execution of B prior to the evaluation of E)
modifying P to point to a copy of the array object into which it formerly
pointed would change the value of E. 137) Note that ââbasedââ is defined only
for expressions with pointer types.

(also, int*q=p; inside B means that q is based on p, despite what Richard said
in PR48885)

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]