Opened 7 years ago

Closed 6 years ago

#13377 closed defect (fixed)

Remove dead code from gen.pyx

Reported by: nbruin Owned by: was
Priority: minor Milestone: sage-5.12
Component: interfaces Keywords: easy, beginner, sd51
Cc: Merged in: sage-5.12.beta0
Authors: Alex Ghitza Reviewers: Frédéric Chapoton
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Description

I get two complaints about unreachable code in sage/libs/pari/gen.pyx for toGEN (line 9197 after #12215) and _coerce_c_impl (line 9670 after #12215) and the compiler is correct if I read the code correctly. The edits causing this both are from the pre-trac ticket era (2007 and 2006 respectively)

Attachments (1)

trac_13377-dead_code_gen_pyx.patch (759 bytes) - added by AlexGhitza 6 years ago.

Download all attachments as: .zip

Change History (7)

Changed 6 years ago by AlexGhitza

comment:1 Changed 6 years ago by AlexGhitza

  • Authors set to Alex Ghitza
  • Keywords sd51 added
  • Status changed from new to needs_review

Removed the code in question.

comment:2 Changed 6 years ago by cremona

The description mentions two blocks to be removed but the patch only removes one. Why?

comment:3 Changed 6 years ago by AlexGhitza

Ah, forgot to mention that the other block has already disappeared. You can see this by (a) looking at what happens when you apply the patch and rebuild sage--there are no other warnings about unreachable code; and/or (b) reading the very short function _coerce_c_impl and seeing that there are no issues.

comment:4 Changed 6 years ago by chapoton

  • Reviewers set to Frédéric Chapoton
  • Status changed from needs_review to positive_review

looks good to me, positive review

comment:5 Changed 6 years ago by jdemeyer

  • Milestone changed from sage-5.11 to sage-5.12

comment:6 Changed 6 years ago by jdemeyer

  • Merged in set to sage-5.12.beta0
  • Resolution set to fixed
  • Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.