My opinion is that shooting pictures of the homeless is somewhat disrespectful. Sort of inhumane. But, from a purely objective standpoint, there really is no reason why it should be illegal.
I suppose if someone was homeless, but wanted to remain anonymous about it, or didn't want to have that situation posted all over the place, it would be very harmful to be photographed - defaming, more or less. And defamation is illegal in most cases.
Of course, it is going to be hard for the law to prove that you were taking a picture of the homeless person and not the door he was sitting beside. Where are they going to draw the line? Will it be illegal to print and sell a cityscape that shows street people? I have a large panoramic of Paris that does that, but my subject was certainly NOT the homeless, but rather the river. Will the law force me to crop out that section of the image or airbrush it out?
I have a feeling that photography is going to become an increasingly underground art - pretty soon, shooting with film will define you as being part of some secretive artist cult.