c-warn.c (check_address_or_pointer_of_packed_member): Handle the case when rhs is...
authorBernd Edlinger <bernd.edlinger@hotmail.de>
Mon, 28 Jan 2019 13:14:37 +0000 (13:14 +0000)
committerBernd Edlinger <edlinger@gcc.gnu.org>
Mon, 28 Jan 2019 13:14:37 +0000 (13:14 +0000)
commit2a06eba5b77e3d85195759db6247271a4802c8e6
treed24e7597ebf8116f073230e2b3637991f496139a
parent5ebfd62be840165392d2cbdbc98f0f971cd91300
c-warn.c (check_address_or_pointer_of_packed_member): Handle the case when rhs is of array type correctly.

2019-01-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * c-warn.c (check_address_or_pointer_of_packed_member): Handle the case
        when rhs is of array type correctly.  Fix handling of nested structures.
        Fix handling of indirect_ref together with nop_expr and/or addr_expr.
        (check_and_warn_address_or_pointer_of_packed_member): Fix handling of
        type casts within nested compound expressions.

testsuite:
2019-01-28  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * c-c++-common/Waddress-of-packed-member-1.c: Extended test case.
        * c-c++-common/Waddress-of-packed-member-2.c: New test case.

From-SVN: r268337
gcc/c-family/ChangeLog
gcc/c-family/c-warn.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/Waddress-of-packed-member-1.c
gcc/testsuite/c-c++-common/Waddress-of-packed-member-2.c [new file with mode: 0644]