We say very little about reads and writes to aggregate /
compound objects, just scalar objects (i.e. assignments don't
cause reads).  Let's lets say something safe about aggregate
objects, but only for those that are the same size as a scalar
type.

There's an equal-sounding section (Volatiles) in extend.texi,
but this seems a more appropriate place, as specifying the
behavior of a standard qualifier.

gcc:
        PR middle-end/94600
        * doc/implement-c.texi (Qualifiers implementation): Add blurb
        about access to the whole of a volatile aggregate object, only for
        same-size as scalar object.
---
 gcc/doc/implement-c.texi | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/gcc/doc/implement-c.texi b/gcc/doc/implement-c.texi
index 692297b69c4..d64922b28ad 100644
--- a/gcc/doc/implement-c.texi
+++ b/gcc/doc/implement-c.texi
@@ -576,6 +576,10 @@ are of scalar types, the expression is interpreted by GCC 
as a read of
 the volatile object; in the other cases, the expression is only evaluated
 for its side effects.
 
+When an object of aggregate type has the same size as a scalar type, GCC
+handles an access to the whole of that volatile aggregate type object
+equal to an access to that volatile same-sized scalar type object.
+
 @end itemize
 
 @node Declarators implementation
-- 
2.11.0

Reply via email to