That is a very good question young alba, as unless one has taken the drugs before then, as you say, how is one to know?
The other complicating factor is that any untoward symptoms after taking the drug are looked upon as "allergic to the drug" and in many cases, the most in my opinion, has nothing to do with the drug.
An example...how many times have you heard "I cannot take that antibiotic as it brings me out in a rash" in actual fact almost certainly, in my opinion, the rash is a part of the illness and nothing to do with the antibiotic.
Also, the word allergy is totally wrong in relation to the side effects of drugs, hypersensitivity or "exaggerated " response is a much better term, and one has to take the drug before one can tell what the reaction is to be.
I would throw away these instruction leaflets completely..".I cannot take Ibuprofen because the instructions say that if I have an ulcer, this drug must not be taken" This may be true but many people with "ulcers" take Ibuprofen without any problems, but some do have problems, one must take them to find out.
I could go on and on about this but I always find it difficult to proffer my answers at a level that will be understood by all and not just to the informed.
Good question.