Red 40 lake is the water soluble azo dye disodium salt of 6-hydroxy-5-[(2-methoxy-5-methyl-4-sulfophenyl)azo]-2-naphthalenesulfonic acid.
FD&C Red No. 40, also known as Allura Red, is commonly used in liquid medications with cherry, strawberry or “berry” flavoring. It may also be used as a colorant in tablets and capsules. Red No. 40 replaced Red Dye No. 2 in 1976 due to reported links with cancer from Red Dye No. 2.
FDA performs regulatory review for color additives used in foods, drugs, cosmetics, and medical devices. These colors are then certified by the FDA for safe use according to specifications. The FD&C specifies the color is approved for use in foods, drugs and cosmetics.
Source: Drugs.com, https://www.drugs.com/inactive/fd-c-red-no-40-lake-327.html