How about the reverse? You move to France, have a kid that's a French citizen and when the child is 18, you are kicked out but they are allowed to stay.
An odd case: if both parents are foreigners, but one of them is born in France, then their children will automatically become French at birth (if born in France).
Then there are special rules for Algeria, as it was a part of France until 1962...