In addition to anonymoushn's correct point, I would also observe that even if we do treat infinity as a specific real number, the integration of a function zero at everywhere except one specific point from -inf to +inf is still 0. And further if we are treating it as a real number, you've now violated the uniformity constraint; P(0) != P(inf), therefore it is no longer a uniform distribution, the thing you are putatively building.
For an analysis of this and some other interesting things, see the Dirac delta (psuedo-)function: http://en.wikipedia.org/wiki/Dirac_delta_function