re PR c/69002 (C front end should warn about undefined access to atomic structure...
authorMarek Polacek <polacek@redhat.com>
Tue, 22 Dec 2015 15:23:21 +0000 (15:23 +0000)
committerMarek Polacek <mpolacek@gcc.gnu.org>
Tue, 22 Dec 2015 15:23:21 +0000 (15:23 +0000)
commitfda5652f8fe24f637b29608d12fff72e6df08ba9
tree8c5ff4eaa6ca02b1a6b16ad476daf41cbf9fd2a1
parent5a00b0aaf036edadc48861b91d3804796525c2d5
re PR c/69002 (C front end should warn about undefined access to atomic structure or union)

PR c/69002
* c-typeck.c (build_component_ref): Warn when acessing elements of
atomic structures or unions.

* gcc.dg/c11-atomic-1.c: Add dg-warnings.
* gcc.dg/c11-atomic-4.c: New test.

From-SVN: r231902
gcc/c/ChangeLog
gcc/c/c-typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/c11-atomic-1.c
gcc/testsuite/gcc.dg/c11-atomic-4.c [new file with mode: 0644]