Often when writing answers or comments, I refer to some other participant as “he”, fully aware that there is a good chance I'm using the wrong pronoun for a woman. But names often don't tell much, and avatar images often less, those default avatar patterns in particular.
I'd like a way where users can voluntarily indicate their gender in their profile page. Those who do can thereby increase the chances I'll be addressing them correctly. Those who don't can't hold me responsible for guessing wrong.
Since I'm aware that gender isn't as binary as it seems at first glance, you might even label that choice as “refer to me as ‘he’ / as ‘she’ / any way you like”, which would make the intended use of that information more readily apparent. At the same time, it would become clear that there has to be no relation to “real” gender as long as the user is satisfied with the way he or she is addressed.
In Any thoughts on how to react to gender-specific language? Melanie describes the problem of being addressed as “he” despite her (at least in my culture obviously) female name. So names might be an alternative, and one answer suggests a profile picture. But names depend a lot on culture, and not everyone is happy about having a face associated with his or her name, whether it's a real face or just some generated avatar. Of course, one could always include gender information in the free form text on the profile page, but I don't read all that text hunting for that clue. So a canonical place to look, like a fixed position on the profile page, would in my opinion be better.