This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/67705] incorrect restrict interpretation
- From: "glisse at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 24 Sep 2015 09:07:47 +0000
- Subject: [Bug tree-optimization/67705] incorrect restrict interpretation
- Auto-submitted: auto-generated
- References: <bug-67705-4 at http dot gcc dot gnu dot org/bugzilla/>
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)