PR c/68966 - atomic_fetch_* on atomic_bool not diagnosed
authorMartin Sebor <msebor@redhat.com>
Fri, 8 Jan 2016 01:00:25 +0000 (01:00 +0000)
committerMartin Sebor <msebor@gcc.gnu.org>
Fri, 8 Jan 2016 01:00:25 +0000 (18:00 -0700)
commit7a127fa7c463b6b7c0285b32bac52bbdfc9a2117
treed7b58a67882cd51f1addf5e9b63478ed3a012eb1
parentc9733b8599c75031c40b85c15666730135f6f59b
PR c/68966 - atomic_fetch_* on atomic_bool not diagnosed

gcc/ChangeLog:
* doc/extend.texi (__atomic Builtins, __sync Builtins): Document
constraint on the type of arguments.

gcc/c-family/ChangeLog:
* c-common.c (sync_resolve_size): Reject first argument when it's
a pointer to _Bool.

gcc/testsuite/ChangeLog:
* gcc.dg/atomic-fetch-bool.c: New test.
* gcc.dg/sync-fetch-bool.c: New test.

From-SVN: r232147
gcc/ChangeLog
gcc/c-family/ChangeLog
gcc/c-family/c-common.c
gcc/doc/extend.texi
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/atomic-fetch-bool.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/sync-fetch-bool.c [new file with mode: 0644]