Legitimacy is only part of the consideration, and I would mention that first.
I agree that there’s a built in circularity to the notion here, and that can be confusing. When you think about it though, it’s a definitional thing. What do the words actually mean?
The primary meaning of “legitimate” is “lawful” or “according to the law.” In fact, the English translation of the code of canon law uses “legitimate” (or something very similar like “legitimately”) about 124 times. That primary meaning is just something that a law sanctions or approves.
So we would look to the law itself to discover if something is according to it or against it… A law itself would have to say whether someone’s status is legitimate (according to that law) or illegitimate (against that law). That gives the secondary or more specific meaning of the word as applied to the status of children. That’s only mentioned three or four times.
As to Church law, canon 1137 itself says that children conceived or born of a putative (i.e., thought to be valid but later discovered not to be) marriage are legitimate.
Church law does not really go much further. There are no particular effects, except to say that illegitimate children are rendered legitimate through the subsequent valid or putative marriage of their parents, or through a rescript of the Holy See. (c. 1139). But the condition does not impede the person from things like being ordained or holding Church office, etc.
By contrast, civil law usually attaches effects regarding inheritance, etc., but a civil attorney would be best suited to address that.
Now there is a second part to consider. Even in a putative marriage, people assume obligations and duties that arise from natural justice and civil law. These do not terminate by virtue of a decree of nullity. So if a marriage is found to be null, canon 1689 still says, “In the sentence the parties are to be advised of the moral and even civil obligations which they may have to each other and to their children as regards the support and education of the latter.”
And obviously, the children continue to possess all those rights associated with our basic human dignity as created by God and those which they may have as baptized members of the Christian faithful.
A little clarification, Ron,
If a marriage is declared null, it has no future status as a natural marriage either. There are only three possibilities here: Valid-natural, valid-sacramental, or just invalid.
Remember that a decree of nullity does not say that the sacrament never existed, but that canonical marriage itself did not exist, even though a civil one did. Since the sacrament cannot exist without a valid marriage (and two baptized parties), if the marriage is found null, the sacrament did not exist.