This is the mail archive of the gcc-bugs@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]

[Bug c/68966] atomic_fetch_* on atomic_bool not diagnosed


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);
   ^~~~~~~~~~~~~~~~~~

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