(a) All marriages between parents and children, including grandparents and grandchildren of every degree, between brothers and sisters of the half as well as the whole blood, and between uncles and nieces, and between aunts and nephews, and between first cousins are declared to be incestuous and absolutely void. This section shall extend to illegitimate children and relations.
(b) Whoever contracts marriage in fact, contrary to the prohibitions of subsection (a) of this section, and whoever knowingly solemnizes the marriage shall be deemed guilty of a misdemeanor and shall upon conviction be fined or imprisoned, or both, at the discretion of the jury who shall pass on the case, or if the conviction shall be by confession, or on demurrer, then at the discretion of the court.