Guard notes for -Waddress-of-packed-member on warning emission (PR c/89985)
authorDavid Malcolm <dmalcolm@redhat.com>
Fri, 5 Apr 2019 15:15:37 +0000 (15:15 +0000)
committerDavid Malcolm <dmalcolm@gcc.gnu.org>
Fri, 5 Apr 2019 15:15:37 +0000 (15:15 +0000)
commit34facf20abc583e66764733263f8412929f9eaf9
tree00d9cefee641ffda0258a78ddcaeb28726ca59f6
parentfe7c4fa9818f0e75cf46e95d6117d3f9f73ebb2e
Guard notes for -Waddress-of-packed-member on warning emission (PR c/89985)

gcc/c-family/ChangeLog:
PR c/89985
* c-warn.c (check_address_or_pointer_of_packed_member): Add
auto_diagnostic_group.  Guard inform calls by result of
warning_at call.

gcc/testsuite/ChangeLog:
PR c/89985
* c-c++-common/pr89985.c: New test.

From-SVN: r270169
gcc/c-family/ChangeLog
gcc/c-family/c-warn.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/pr89985.c [new file with mode: 0644]