Before C99, even C doesn't support this, so Cython doesn't have any choice.
Starting from C99:
from libc.math cimport INFINITY
cdef double f():
return INFINITY
See Cython source https://github.com/cython/cython/blob/master/Cython/Includes/libc/math.pxd