"In utero exposures due to smoking during pregnancy may increase the risk of both diabetes and obesity through programming, resulting in lifelong metabolic dysregulation, possibly due to fetal malnutrition or toxicity. The odds ratios for obesity without type 2 diabetes are more modest than those for diabetes and the scope for confounding may be greater. Smoking during pregnancy may represent another important determinant of metabolic dysregulation and type 2 diabetes in offspring. Smoking during pregnancy should always be strongly discouraged."

Source

Montgomery, S. M., & Ekbom, A. (2002). Smoking during pregnancy and diabetes mellitus in a British longitudinal birth cohort. BMJ (Clinical research ed.), 324(7328), 26–27. doi.org/10.1136/bmj.324.7328.26