Never do this with prescription meds on the concern that luggage gets lost or damaged.
If you have meds that you want to carry discretely, just put the bottles in some smaller bag in your carry on. Then just make sure that carry on isn't going to have something else in it that would likely get flagged on an X-ray for manual review.
In the very unlikely event that your carry on has to be searched at the terminal, they'll be looking for what caused the X-ray to alert, not what's in your pill bottle.