Compounds of two nouns take the gender of the first noun:
un chou-fleur / le chou; la fleur -- cauliflower
Compounds of an adjective and a noun take the gender of the noun:
une chauve-souris (a bat):
When the compound noun consists of a verb and a complement noun, or of a preposition and a noun, the noun is generally masculine:
un porte-plume
(pen holder)
un abat-jour (a lampshade)
un sous-marin (a submarine)
See Also: