This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] #52291 - clarify sync_fetch_and_OP for pointers


On 01/20/2016 05:11 PM, Martin Sebor wrote:
The bug points out that while the __sync_fetch_and_OP intrinsics are
documented to have semantics equivalent to the "x OP= y" compound
assignment expressions, when used with pointer operands they actually
behave as if they operated on integers.  I.e., they are not scaled by
the size of the pointed-to type.

The attached patch brings the documentation of both the __sync_ and
the __atomic_ intrinsics into alignment with their actual effects.

Martin

PS See also c/64843 for some additional background.

gcc-52291.patch


2016-01-20  Martin Sebor<msebor@redhat.com>

	PR c/52291
	* extend.texi (__sync Builtins): Clarify the semantics aof
	__sync_fetch_and_OP built-ins on pointers.
	(__atomic Builtins): Same.
OK
jeff


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]