Currently in middle of job search, and was asked this twice today.
I've heard that whoever "blinks" first is worse off - employee goes first, employer defaults to bottom of range and employee has to fight to get back up. Employer goes first, employee negotiates for top of range.
For now I've deferred it, saying that I can't estimate that until I know more about the scope of the role and how well of a fit I see.
But curious what others say.
If you feel you're making well below market value for the industry & geo that you're interviewing in, I wouldn't set an 'anchor'. You have nothing to gain. Just wait for them to make you an offer. This is especially true if you're interviewing at a smaller company where they have less rigorous compensation guidelines for a given position, and they might be more tempted to low-ball you. A good manager at a large company shouldn't change their comp decision if you're making surprising little now... but you never know.
If you're currently in-line with the market, you can tell them or not. Either way you're in a good position to negotiate if the offer comes in a bit soft. Most candidates I see in this situation are upfront about their current comp and it makes the whole process more efficient.
If you're making more than market or more than they're expecting, be up front. Especially at a large company. Once they get approval to issue an offer it might be impossible or extremely difficult to increase the comp outside the band for that level. If they know in advance that you're making more than expected they can consider an offer at the next higher level. Also, don't just make up a number that puts you above market. First, if it is clearly too high it will make them question your honesty. Second, it might preclude you from an offer altogether if they don't feel you're ready for the next grade level.
As a side note, when candidates defer on the comp question, I assume they're making less than market. Almost as a rule 9 out of 10 candidates who defer are coming from other geo's or other industries that don't pay as well. As a policy, I try to keep my team's comp equitable & calibrated (much more tightly than just blindly following our company bands & guidelines) so I don't give them a lower offer. But other managers might not do the same.