This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/68966] atomic_fetch_* on atomic_bool not diagnosed
- From: "msebor at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Fri, 18 Dec 2015 04:02:51 +0000
- Subject: [Bug c/68966] atomic_fetch_* on atomic_bool not diagnosed
- Auto-submitted: auto-generated
- References: <bug-68966-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=68966
Martin Sebor <msebor at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |msebor at gcc dot gnu.org
--- Comment #1 from Martin Sebor <msebor at gcc dot gnu.org> ---
Created attachment 37077
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=37077&action=edit
Prototype patch.
Prototype patch. It rejects atomic_bool* operands in the __atomic_fetch_xxx
builtins with an error like this:
z.c:7:3: error: operand type â_Atomic atomic_bool * {aka _Atomic _Bool *}â is
incompatible with argument 1 of â__atomic_fetch_addâ
__atomic_fetch_add (&a, 1, __ATOMIC_SEQ_CST);
^~~~~~~~~~~~~~~~~~