In summary, those basically are high treason, murder/manslaughter, assault, robbery, counterfeiting, creating fire/explosions/radiation, destroying/interference in infrastructure (planes etc.).
Back in the day, noone prevented same-sex partners to marry in Germany in front of a religious congregation which allowed that according to their rules. They just couldn't get the marriage certificate from the State.
As for the illegality: it would make gay marriage an impossible act, because the legal framework to marry two men (or two women) from a legal standpoint (which includes the marriage certificates and the rights and responsibilities associated with it) would not exist. A public official who wrote a marriage certificate for a same-sex couple in 1999 would not have committed a crime, he or she would just have written an invalid form which would have had no legal bearing (and the public official would probably have been reprimanded).
Something you cannot do by definition cannot be illegal.
Ability to advocate for illegal, repugnant, or offensive ideas or acts is in fact the entire point of free speech, so being able to do it is an essential right.