A marriage ceremony can be a civil one or a religious one. Canon law states that any child born into a putative marriage is legitimate. This means that whether or not the marriage ceremony itself was valid, the child still is since the marriage was thought to be valid. A Catholic marriage that ends with an annulment technically tends to take away a child’s legitimacy.
The point of an annulment is to decree that the marriage never officially took place. Since the circumstances of a putative marriage are different then that of a regular one, allowances are made for the child. A Catholic marriage may need to be annulled if one of the participants wants to remarry in the Catholic Church but annulments are more standard when it comes to handling the end of a putative marriage.
The Putative Marriage Doctrine, which has been codified by several states in America was derived from the Canon law stance on putative marriage. The same considerations are needed to define a putative marriage. The nature of having a doctrine for it is to try to make the process of dissolving a putative marriage safe for the individuals in it. This means that the putative spouse should still be protected under standard matrimonial laws.
Current Canon laws involving children and matrimony state that all children born into matrimony are legitimate. Therefore, any children born into a putative marriage are legitimate as well.
A valid marriage ceremony must be performed in a Catholic marriage to be considered binding. If a marriage ceremony was not performed, then no annulment is needed since it was never considered to be a valid marriage in the first place.