Sheikh Yusuf Al-Qaradawi in this regard has stated that: Is it okay for a pregnant woman not to fast during Ramadan because she fears that the foetus might die? Yes, she is exempted from fasting. Furthermore, if this fear is based on certainty and has been reported by a Muslim doctor who is firm in his religion and field, then it is obligatory upon her not to fast so that fetus does not die. Allah said: “And do not kill your children.” (17:31)
This foetus is a respectable soul, and it is not permissible for a man or a woman to neglect it and cause it to die. Allah never overburdens His worshipers. It has also come from Ibn `Abbas that the pregnant and the women are within the group of: “And those who are unable have to feed a poor person.”(2:184)
If the pregnant and breast-feeding women fear for themselves, then most of the scholars say that they should not fast and they only have to make up for it. In this case they are similar to the sick. But for the pregnant woman who fears for the fetus or the breast-feeding woman who fears for the child, it is unanimously agreed that they are not to fast. The scholars have differed on whether she has to make up for it or if she has to just feed a poor person for each day of if she has to do both.
The majority of scholars say that she is to make up for it, while Ibn `Umar and Ibn `Abbas say that she is to feed a poor person, and the others say that she is to do both. But it appears to me that it is permissible to feed a poor person instead of making up for it, especially with regards to the woman who is constantly pregnant or breastfeeding and would not find a chance to make up for it. One year she would be pregnant, the next year she would be breast-feeding, the next she would be pregnant and so on. She would constantly be either pregnant or breast-feeding to the extent that she would not be able to make up for it. And if we burdened her to make up for all the days she did not fast because of pregnancy or breast-feeding, then that would mean that she would have to fast a number of continuous years after that. This has in it a great hardship and Allah does not wish for His worshipers to be in hardship.