Since you are not targeting a specific drug, it is difficult to answer your question specifically. Indeed, the risks vary depending on the medication involved.
In general, contrary to what it says on the bottle, many cough suppressants are safe during pregnancy. This includes DM (dextromethorphan), menthol and guafenesin. The companies state that these syrups are not recommended during pregnancy to protect themselves from lawsuits because they have not done studies for this population. However, the data in practice on these ingredients is reassuring.
Some syrups will have a contraindication, because there is a lack of data, such as Helixia syrup. Finally, some syrups will be contraindicated because some of the ingredients they contain are not safe. For example, the decongestants sometimes added to syrups, such as pseudoephedrine, have been associated during the first trimester with an increased risk of gastroschisis. This is a malformation of the abdominal cavity.
I hope I have helped you,
Sarah-Yan Chagnon, pharmacist