This question already has an answer here:
One of the things I find really annoying about Stack Overflow is that many users will post useless comments and others will upvote them. If someone doesn't think you did do your homework, then they have the right to flag a post as such, but they should not be allowed to post poor comments.
There should be a "flag as unconstructive" next to comments (and not just solutions posted). If some people are constantly in the habit of posting useless comments, penalties should be taken like locking them out of Stack Overflow for a few days. Then maybe they would think twice about making such comments. Just have a look at the comments on this post for example:
People on Stack Overflow shouldn't be able to get away with this. If they don't like a post, they should either ignore it or flag it under some category.