Since we have a daughter with food allergies, we inform the server and manager of the situation. The great majority of the time, it works out great--and we tip well to show our appreciation.
When it doesn't, we let them know what needs to be done, and they make it right. We have never explicitly asked for compensation in those situations, but the server/manager often will remove Miss Swede's meal from our bill (and we tip 20% pre-removal to show our gratitude). Honestly, anything extra is above and beyond our expectations. In one situation, Red Robin removed Miss Swede's meal from the bill and gave us a $25 gift card. In another situation, a hotel restaurant paid for our hotel stay (although that was a more serious situation that almost ended up with a trip to the ER).