diff options
author | Hans-Peter Nilsson <hp@axis.com> | 2020-12-04 20:27:23 +0100 |
---|---|---|
committer | Hans-Peter Nilsson <hp@axis.com> | 2020-12-04 20:29:27 +0100 |
commit | eb79f4db49c5f5a807555e9d374524664eb537bf (patch) | |
tree | 21d2016631f24ef996758f88fbdc631e4bb9848e /gcc/doc | |
parent | 78c4a9feceaccf487516aa1eff417e0741556e10 (diff) | |
download | gcc-eb79f4db49c5f5a807555e9d374524664eb537bf.zip gcc-eb79f4db49c5f5a807555e9d374524664eb537bf.tar.gz gcc-eb79f4db49c5f5a807555e9d374524664eb537bf.tar.bz2 |
doc/implement-c.texi: About same-as-scalar-type volatile aggregate accesses, PR94600
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:
2020-12-04 Hans-Peter Nilsson <hp@axis.com>
Martin Sebor <msebor@redhat.com>
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 a scalar object.
Diffstat (limited to 'gcc/doc')
-rw-r--r-- | gcc/doc/implement-c.texi | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/doc/implement-c.texi b/gcc/doc/implement-c.texi index 692297b..d7433ba 100644 --- a/gcc/doc/implement-c.texi +++ b/gcc/doc/implement-c.texi @@ -576,6 +576,11 @@ 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 an aggregate type, with the same size and alignment as a +scalar type @code{S}, is the subject of a volatile access by an assignment +expression or an atomic function, the access to it is performed as if the +object's declared type were @code{volatile S}. + @end itemize @node Declarators implementation |