Hi,

It looks very nice. Can youy add it to compiler?

I thought that you'll find an easier way to generate these warnings using pExpr tree :) Like there was with push/pop optimisation with jump in between some time ago.


This is not real deadcode. In dead code eliminator inside compiler
I intentionally do not strip the last HB_P_ENDPROC. See harbour
compiler/hbdead.c[591].
If you remove this if() statement then it will be stripped.
It left the last HB_P_ENDBLOCK/HB_P_ENDPROC for some historical reasons
and code which needed it but probably I've already cleaned all such code.
Your PCODE analyzer detected such dummy HB_P_ENDPROC PCODE at the end of
function body.

Yes, I know it is a final unreachable ENDPROC, but I didn't know it was intentional.


Very nice job. I would like to ask to integrate it with compiler.
If you will need any help then I'll do what I can.

I'll try to add to compiler, but I need to rethink conditions of warnings, and code optimisation. There is always a danger for locals to be infected by references.
  xLocal := xParam // not useless assignment if xParam is reference
  xLocal := 1
And how about that?:
  xLocal := f()
  xLocal := 1
Should we generate warning in these cases?


Regards,
Mindaugas

_______________________________________________
Harbour mailing list
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to