This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH, obvious] Remove double condition from dwarf2out.c


On Fri, Sep 02, 2016 at 07:52:45PM +0300, Kirill Yukhin wrote:
> Hi,
> Remove identical conditions from AND
> in return.
> Will check-in after bootstrap/regtest on i386|x86_64 as obvious.
> 
> gcc/
>     * dwarf2out.c (dw_val_equal_p): Remove redundant condition in
>     return statement.

This isn't obvious, val_vms_delta uses both .lbl1 and .lbl2, for equality
I bet you want to compare both.  I.e.
       return (!strcmp (a->v.val_vms_delta.lbl1, b->v.val_vms_delta.lbl1)
-	      && !strcmp (a->v.val_vms_delta.lbl1, b->v.val_vms_delta.lbl1));
+	      && !strcmp (a->v.val_vms_delta.lbl2, b->v.val_vms_delta.lbl2));

	Jakub


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]