diff mbox series

Fix toplevel comment in attr-fnspec.h

Message ID 20201015115821.GA83564@kam.mff.cuni.cz
State New
Headers show
Series Fix toplevel comment in attr-fnspec.h | expand

Commit Message

Jan Hubicka Oct. 15, 2020, 11:58 a.m. UTC
Hi,
this patch fixes some confussion I managed to introduce into the
toplevel comment.

OK?

Honza
	* attr-fnspec.h: Fix toplevel comment.

Comments

Richard Biener Oct. 15, 2020, 12:12 p.m. UTC | #1
On Thu, 15 Oct 2020, Jan Hubicka wrote:

> Hi,
> this patch fixes some confussion I managed to introduce into the
> toplevel comment.
> 
> OK?
> 
> Honza
> 	* attr-fnspec.h: Fix toplevel comment.
> diff --git a/gcc/attr-fnspec.h b/gcc/attr-fnspec.h
> index 921bb48ae6a..30c0becfdf2 100644
> --- a/gcc/attr-fnspec.h
> +++ b/gcc/attr-fnspec.h
> @@ -30,12 +30,11 @@
>  
>     character 2+2i specifies properties of argument number i as follows:
>       'x' or 'X' specifies that parameter is unused.
> -     'r' or 'R' specifies that parameter is only read and memory pointed to is
> -		never dereferenced.
> -     'w' or 'W' specifies that parameter is only written to.
> +     'r' or 'R' specifies that parameter is only read and it does not escape

 'specifies that the memory pointed to by the parameter is only read and 
does not escape'

> +     'w' or 'W' specifies that parameter does not escape

 'specifies that the memory pointed to by the parameter does not escape'

>       '.'	specifies that nothing is known.
> -   The uppercase letter in addition specifies that parameter
> -   is non-escaping. 
> +   The uppercase letter in addition specifies that parameter is read/written
> +   only dirrectly (i.e. *param is ok, but **param is not)

The uppercase letter in addition specifies that the memory pointed to
by the parameter is not dereferenced.  For 'r' only read applies
transitively to pointers read from the pointed-to memory.

>  
>     character 3+2i specifies additional properties of argument number i
>     as follows:
>
Jan Hubicka Oct. 15, 2020, 12:47 p.m. UTC | #2
> On Thu, 15 Oct 2020, Jan Hubicka wrote:
> 
> > Hi,
> > this patch fixes some confussion I managed to introduce into the
> > toplevel comment.
> > 
> > OK?
> > 
> > Honza
> > 	* attr-fnspec.h: Fix toplevel comment.
> > diff --git a/gcc/attr-fnspec.h b/gcc/attr-fnspec.h
> > index 921bb48ae6a..30c0becfdf2 100644
> > --- a/gcc/attr-fnspec.h
> > +++ b/gcc/attr-fnspec.h
> > @@ -30,12 +30,11 @@
> >  
> >     character 2+2i specifies properties of argument number i as follows:
> >       'x' or 'X' specifies that parameter is unused.
> > -     'r' or 'R' specifies that parameter is only read and memory pointed to is
> > -		never dereferenced.
> > -     'w' or 'W' specifies that parameter is only written to.
> > +     'r' or 'R' specifies that parameter is only read and it does not escape
> 
>  'specifies that the memory pointed to by the parameter is only read and 
> does not escape'
> 
> > +     'w' or 'W' specifies that parameter does not escape
> 
>  'specifies that the memory pointed to by the parameter does not escape'
> 
> >       '.'	specifies that nothing is known.
> > -   The uppercase letter in addition specifies that parameter
> > -   is non-escaping. 
> > +   The uppercase letter in addition specifies that parameter is read/written
> > +   only dirrectly (i.e. *param is ok, but **param is not)
> 
> The uppercase letter in addition specifies that the memory pointed to
> by the parameter is not dereferenced.  For 'r' only read applies
> transitively to pointers read from the pointed-to memory.

Thanks a lot!  This is what I comitted.

gcc/ChangeLog:

2020-10-15  Jan Hubicka  <hubicka@ucw.cz>
	    Richard Biener  <rguenther@suse.de>

	* attr-fnspec.h: Fix toplevel comment.

diff --git a/gcc/attr-fnspec.h b/gcc/attr-fnspec.h
index 921bb48ae6a..d38b84a969e 100644
--- a/gcc/attr-fnspec.h
+++ b/gcc/attr-fnspec.h
@@ -30,12 +30,14 @@
 
    character 2+2i specifies properties of argument number i as follows:
      'x' or 'X' specifies that parameter is unused.
-     'r' or 'R' specifies that parameter is only read and memory pointed to is
-		never dereferenced.
-     'w' or 'W' specifies that parameter is only written to.
+     'r' or 'R' specifies that the memory pointed to by the parameter is only
+		read and does not escape
+     'w' or 'W' specifies that the memory pointed to by the parameter does not
+		escape
      '.'	specifies that nothing is known.
-   The uppercase letter in addition specifies that parameter
-   is non-escaping. 
+   The uppercase letter in addition specifies that the memory pointed to
+   by the parameter is not dereferenced.  For 'r' only read applies
+   transitively to pointers read from the pointed-to memory.
 
    character 3+2i specifies additional properties of argument number i
    as follows:
diff mbox series

Patch

diff --git a/gcc/attr-fnspec.h b/gcc/attr-fnspec.h
index 921bb48ae6a..30c0becfdf2 100644
--- a/gcc/attr-fnspec.h
+++ b/gcc/attr-fnspec.h
@@ -30,12 +30,11 @@ 
 
    character 2+2i specifies properties of argument number i as follows:
      'x' or 'X' specifies that parameter is unused.
-     'r' or 'R' specifies that parameter is only read and memory pointed to is
-		never dereferenced.
-     'w' or 'W' specifies that parameter is only written to.
+     'r' or 'R' specifies that parameter is only read and it does not escape
+     'w' or 'W' specifies that parameter does not escape
      '.'	specifies that nothing is known.
-   The uppercase letter in addition specifies that parameter
-   is non-escaping. 
+   The uppercase letter in addition specifies that parameter is read/written
+   only dirrectly (i.e. *param is ok, but **param is not)
 
    character 3+2i specifies additional properties of argument number i
    as follows: