Commit e1cf192b by Eric Botcazou Committed by Eric Botcazou

extend.texi (scalar_storage_order type attribute): Document restriction on type…

extend.texi (scalar_storage_order type attribute): Document restriction on type punning and aliasing, and remove future tense.

	* doc/extend.texi (scalar_storage_order type attribute): Document
	restriction on type punning and aliasing, and remove future tense.

From-SVN: r232718
parent b57d3a5c
2016-01-22 Eric Botcazou <ebotcazou@adacore.com>
* doc/extend.texi (scalar_storage_order type attribute): Document
restriction on type punning and aliasing, and remove future tense.
2016-01-21 Roman Zhuykov <zhroma@ispras.ru> 2016-01-21 Roman Zhuykov <zhroma@ispras.ru>
PR target/69252 PR target/69252
......
...@@ -6496,22 +6496,26 @@ storage order with regard to the scalar storage order of the target: ...@@ -6496,22 +6496,26 @@ storage order with regard to the scalar storage order of the target:
@itemize @itemize
@item Taking the address of a scalar field of a @code{union} or a @item Taking the address of a scalar field of a @code{union} or a
@code{struct} with reverse scalar storage order is not permitted and will @code{struct} with reverse scalar storage order is not permitted and yields
yield an error. an error.
@item Taking the address of an array field, whose component is scalar, of @item Taking the address of an array field, whose component is scalar, of
a @code{union} or a @code{struct} with reverse scalar storage order is a @code{union} or a @code{struct} with reverse scalar storage order is
permitted but will yield a warning, unless @option{-Wno-scalar-storage-order} permitted but yields a warning, unless @option{-Wno-scalar-storage-order}
is specified. is specified.
@item Taking the address of a @code{union} or a @code{struct} with reverse @item Taking the address of a @code{union} or a @code{struct} with reverse
scalar storage order is permitted. scalar storage order is permitted.
@end itemize @end itemize
These restrictions exist because the storage order attribute is lost when These restrictions exist because the storage order attribute is lost when
the address of a scalar or the address of an array with scalar component the address of a scalar or the address of an array with scalar component is
is taken, so storing indirectly through this address will generally not work. taken, so storing indirectly through this address generally does not work.
The second case is nevertheless allowed to be able to perform a block copy The second case is nevertheless allowed to be able to perform a block copy
from or to the array. from or to the array.
Moreover, the use of type punning or aliasing to toggle the storage order
is not supported; that is to say, a given scalar object cannot be accessed
through distinct types that assign a different storage order to it.
@item transparent_union @item transparent_union
@cindex @code{transparent_union} type attribute @cindex @code{transparent_union} type attribute
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment