A pregnant woman who craves after a food:
If a pregnant woman smells a certain food and craves after it, it is possible for her to miscarry if she is not given this food to eat. The reason for this is because also the fetus has smelled the scent of this food and craves after it and if she doesn’t eat it, it is possible that the fetus will try to exit the womb in order to eat it. This will endanger the life of both the mother and fetus. For this reason, she may be given to eat the food even on Yom Kippur, if necessary to calm down her craving and explaining to her that it is Yom Kippur does not suffice. Likewise, she may even be given nonkosher food to eat if she smells it and craves after it, and not giving her to eat the food can cause her life or the life of her fetus to be in danger, and there is no other way of calming her down and explaining to her that the food is not kosher does not suffice.
Not to pass by and smell non-kosher food: Due to the above, it is extremely important for a pregnant woman to be very careful not to pass by a nonkosher food that has a good scent in order so she does not crave after it and need to eat it in order to calm down her craving to save the life of herself and her fetus.
Not to offer or mention unavailable foods: Likewise, due to the above reason one should not show or mention to a pregnant woman a food that is not available for her to eat, in order so she does not crave after it and God forbid cause her to miscarry.
The story of the mother of Elisha Ben Avuyah:
Some opinion state that the reason that the great and famous Sage Elisha Ben Avuyah became a heretic is due to the following reason: When his mother was pregnant with him, she once passed by a house of idolatry and smelled the forbidden foods and the smell of these foods settled in her stomach like the poison of a snake.
 Admur 617:2; Michaber 617:2; Rambam Yom Kippur 2:9; Mishneh Yuma 82a [8:5]; Ketzos Hashulchan 147:2 p. 7; Shevach Habris 1:9
 Issur Viheter Hearuch 60:5; Kaf Hachaim 617:7 in name of Levush; Ketzos Hashulchan ibid; See Erech Hashulchan 617:1 brought in Kaf Hachaim ibid; See also Besamim Rosh 353 that in today’s times we don’t even try to calm her down as it is a matter of danger and we give her to eat right away whether on Yom Kippur war with a nonkosher food, brought in Pischeiy Olam 617:2 and Kaf Hachaim ibid
 Ketzos Hashulchan ibid
 Shevilei Emuna Nesiv Hei Shevil 1
 Yerushalmi Chagiga 9b