I can tell you that many companies require the harrassment training, and it strongly advises against saying anything about how a coworker looks. You're told not to say "you look very nice today" or "I really like that shirt", etc. Where I work, they really laid it out about not complementing anyone's appearance. So most men I know (myself included) would just avoid the topic completely. The consequences are far too severe, loss of job and financial ruin, if something goes wrong.
Comments wouldn't need to be vulgar or anything to be considered harrasment. It could really be comments like "you look very nice today" that can be used for a harrassment case. No warning needs to be given to the "offender" either, of course, so it's just far too risky. Honestly, I don't want to be that personal with coworkers anyway. Even if there aren't any harrassment problems, intentions are easily misunderstood. Suppose you said "you look very nice today", and the receiver of the comment thought that you perhaps were interested in them. That can lead to rejection and problems with the work relationship. No, this hasn't happened to me (thank god, how awkward that would be!)