Opened 6 years ago

Closed 6 years ago

#22538 closed defect (fixed)

INFINITY is not an enum

Reported by: Jeroen Demeyer Owned by:
Priority: major Milestone: sage-7.6
Component: graphics Keywords:
Cc: Merged in:
Authors: Jeroen Demeyer Reviewers: Travis Scrimshaw
Report Upstream: N/A Work issues:
Branch: 0757a0c (Commits, GitHub, GitLab) Commit: 0757a0c6b5549a90c360e76a30b25d46ce6c62b9
Dependencies: Stopgaps:

Status badges


This is very wrong:

cdef extern from "math.h":
    enum: INFINITY

An enum is assumed to be an int, so this actually treats INFINITY as an int. This causes compiler warnings warning: overflow in implicit constant conversion [-Woverflow].

Change History (4)

comment:1 Changed 6 years ago by Jeroen Demeyer

Branch: u/jdemeyer/infinity_is_not_an_enum

comment:2 Changed 6 years ago by Jeroen Demeyer

Commit: 0757a0c6b5549a90c360e76a30b25d46ce6c62b9
Status: newneeds_review

New commits:

0757a0ccimport INFINITY instead of declaring it as int(!)

comment:3 Changed 6 years ago by Travis Scrimshaw

Reviewers: Travis Scrimshaw
Status: needs_reviewpositive_review

I agree completely.

comment:4 Changed 6 years ago by Volker Braun

Branch: u/jdemeyer/infinity_is_not_an_enum0757a0c6b5549a90c360e76a30b25d46ce6c62b9
Resolution: fixed
Status: positive_reviewclosed
Note: See TracTickets for help on using tickets.