you should not take over the counter medication while you are pregnant. since those medication they sell OTC are often not tested on pregnant women. there might be a chance that will affect the baby. Altho i said might be a chance, you still shouldn't risk it. if u do have catch a cold or flu, consult a doctor.
or you should take vitamin D while you are pregnant, since it will also prevent your baby to have bone problems. consult a doctor before use as well