I agree with Joanne - I always warn my friends.
But make it sound as casual as possible so that you can make it clear they don't have to go to any extra effort (ie: 'I can have meat etc and veges/salad etc, just no carbs') That way you won't disappoint anyone who has cooked a special pasta dish, made their own pizza base fresh for you, etc etc.
And if you're worried, eat a small amount before you go so you're less easily tempted