I've told a number of people my salary and regretted it every time. They seem to take a vicarious pleasure in telling other people how much money I make. "Oh, you should listen to delluminatus, he makes $xx thousand a year." Ugh.
And it also limits employees when they want to move as the new employer knows how much they make now.
What I don't understand is why people don't talk about it. If you tell and you learn you are overpaid then you feel good. If you learn you are underpaid, well, time to go negotiate/look elsewhere.
Do people think they ARE their salary? It's simply money that some people arbitrary decided to pay you...
Having a potential employer know exactly what you where paid before puts you at a big disadvantage when it comes to negotiating a new salary /package.