This is from the current legislation:
THE FOLLOWING APPLIES TO ONLY CERTAIN FORMER FOODSTUFFS from premises such as bakers, supermarkets, retail stores, crisp manufacturers and confectioners (although not from kitchens and restaurants based on these premises). Food items which can be recycled for use in farm animal feed include:
baked goods (bread, cakes, pastry and biscuits), vegetables, pasta, chocolate, sweets, and other products, such as breakfast cereals, which may contain rennet or melted fat, milk, milk products, flavourings, egg, honey, and gelatine of non-ruminant origin (not from pigs or poultry) - provided these items don't constitute the main ingredient. They must not contain - and must not have been in contact with - raw eggs, meat, fish and products or preparations derived from, or incorporating, meat or fish.
milk, milk products provided they are not included in final products for general sale as farm animal feed i.e. can only be distributed to keepers registered on the milk register administered by the Scottish Government.
eggs and egg products can only be sent for farm animal feeding from food factories (or from rendering plants) and not from retail premises or supermarkets.
Baked goods can be turned into feed providing the criteria above are met. This involves the retailer complying with HACCP and have specific procedures to ensure the separation of meat products from the baked good etc.
Unless your local supermarket operates such a system, then it is probably illegal to feed baked goods purchased there to your livestock.
Sue