US basketball star Jason Collins recently revealed he was gay, becoming the first active professional player in the US to declare his homosexuality.
Federer believes any such revelation in men's tennis would not cause problems.
"I don't think it's a problem to be honest. We are relaxed and don't play team sport and mix a lot, not with the girls, but with the guys and we're very open," said the 17-time Grand Slam title winner.
"What would happen in this event? I don't know. I don't know if there is anyone."
Also Read
"I would hope there are no issues on the tour," said the US Open and Olympic champion.
"You know, there have to be some players who are probably gay but I don't think other players have any issues with it and hope tennis deals with this well.
"I saw the Jason Collins thing in basketball and the player and the owners were respectful and happy about his decision and so I think it is a good thing.