This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH] c/68966 - atomic_fetch_* on atomic_bool not diagnosed
- From: Jeff Law <law at redhat dot com>
- To: Martin Sebor <msebor at gmail dot com>, Gcc Patch List <gcc-patches at gcc dot gnu dot org>, Marek Polacek <polacek at redhat dot com>, "Joseph S. Myers" <joseph at codesourcery dot com>
- Date: Sat, 2 Jan 2016 00:43:07 -0700
- Subject: Re: [PATCH] c/68966 - atomic_fetch_* on atomic_bool not diagnosed
- Authentication-results: sourceware.org; auth=none
- References: <567A271B dot 2090403 at gmail dot com>
On 12/22/2015 09:46 PM, Martin Sebor wrote:
The attached patch rejects invocations of atomic fetch_op intrinsics
on objects of _Bool type as discussed in the context of PR c/68908.
Tested on x86_64.
Martin
gcc-68966.patch
gcc/testsuite/ChangeLog:
2015-12-22 Martin Sebor<msebor@redhat.com>
PR c/68966
* gcc.dg/atomic-fetch-bool.c: New test.
* gcc.dg/sync-fetch-bool.c: Same.
gcc/ChangeLog:
2015-12-22 Martin Sebor<msebor@redhat.com>
PR c/68966
* doc/extend.texi (__atomic Builtins, __sync Builtins): Document
constraint on the type of arguments.
gcc/c-family/ChangeLog:
2015-12-22 Martin Sebor<msebor@redhat.com>
PR c/68966
* c-common.c (sync_resolve_size): Reject first argument when it's
a pointer to _Bool.
Index: gcc/c-family/c-common.c
===================================================================
--- gcc/c-family/c-common.c (revision 231903)
+++ gcc/c-family/c-common.c (working copy)
@@ -7667,6 +7667,6 @@
if (error_operand_p (align))
return -1;
if (TREE_CODE (align) != INTEGER_CST
|| !INTEGRAL_TYPE_P (TREE_TYPE (align)))
{
No changes in this hunk. I assume you hand-edited the patch to remove
something that you really didn't intend to submit and left the above
useless hunk.
The patch itself is fine for the trunk.
Thanks,
Jeff