This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c/69002] C front end should warn about undefined access to atomic structure or union
- From: "mpolacek at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Tue, 22 Dec 2015 15:23:52 +0000
- Subject: [Bug c/69002] C front end should warn about undefined access to atomic structure or union
- Auto-submitted: auto-generated
- References: <bug-69002-4 at http dot gcc dot gnu dot org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69002
--- Comment #9 from Marek Polacek <mpolacek at gcc dot gnu.org> ---
Author: mpolacek
Date: Tue Dec 22 15:23:21 2015
New Revision: 231902
URL: https://gcc.gnu.org/viewcvs?rev=231902&root=gcc&view=rev
Log:
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.
Added:
trunk/gcc/testsuite/gcc.dg/c11-atomic-4.c
Modified:
trunk/gcc/c/ChangeLog
trunk/gcc/c/c-typeck.c
trunk/gcc/testsuite/ChangeLog
trunk/gcc/testsuite/gcc.dg/c11-atomic-1.c