On 4/1/19 11:23 AM, Marek Polacek wrote:
On Mon, Apr 01, 2019 at 10:15:11AM +0200, Andreas Schwab wrote:
On Mär 28 2019, Marek Polacek <pola...@redhat.com> wrote:

Andreas, could you please find out why we're not hitting this code in
digest_init_r:

1210       tree elt = CONSTRUCTOR_ELT (stripped_init, 0)->value;
1211       if (reference_related_p (type, TREE_TYPE (elt)))

This is never executed if flag_checking is false, of course.

It's certainly wrong for a warning to depend on flag_checking, so this
patch corrects it, and I hope will fix the ia64 problem as well.

Bootstrapped/regtested on x86_64-linux, ok for trunk?

2019-04-01  Marek Polacek  <pola...@redhat.com>

        * typeck2.c (digest_init_r): Don't condition the object slicing warning
        on flag_checking.

OK.

Jason

Reply via email to