The Vedanta Sutras of Badarayana, Commentary by Sankara (SBE38), tr. by George Thibaut  at sacred-texts.com
28. And there is permission of all food, (only) in the case of danger of life; on account of this being shown (by scripture).
In the colloquy of the prânas the Khandogas record, 'To him who knows this there is nothing which is not food' (Kh. Up. V, 1, 2); and the Vâgasaneyins,' By him nothing is eaten that is not food, nothing is received that is not food' (Bri. Up. VI, 1, 14). The sense of the two passages is that anything may be eaten by him.--A doubt here arises whether the texts enjoin the permission of eating anything
as an auxiliary to knowledge--as calmness of mind, &c., are--or mention them for the purpose of glorification.--The pûrvapakshin maintains that the passages are injunctions because thus we gain an instruction which causes a special kind of activity. What, therefore, the text teaches is the non-operation of a definite rule, in so far as auxiliary to the knowledge of the prânas in proximity to which it is taught. But this interpretation implies the sublation of the scriptural rules as to the distinction of lawful and unlawful food!--Such sublation, we reply, is possible, because the present case is one of general rule and special exception. The prohibition of doing harm to any living creature is sublated by the injunction of the killing of the sacrificial animal; the general rule which distinguishes between such women as may be approached and such as may not, is sublated by the text prescribing, with reference to the knowledge of the Vâmadevya, that no woman is to be avoided ('Let him avoid no woman, that is the vow,' Kh. Up. II, 13, 2); analogously the passage which enjoins, with reference to the knowledge of the prânas, the eating of all food may sublate the general rule as to the distinction of lawful and unlawful food.
To this we reply as follows. The permission to eat any food whatever is not enjoined, since the passages do not contain any word of injunctive power; for the clause, 'To him who knows this there is nothing,' &c., expresses only something actually going on. And where the conception of an injunction does not naturally arise we may not assume one from the mere wish of something causing a special line of activity. Moreover the text says that 'for him who knows this there is nothing that is not food,' only after having said that everything even unto dogs and the like is food for the Prâna. Now food such as dogs and the like cannot be enjoyed by the human body; but all this can be thought of as food of the Prâna. From this it follows that the passage is an arthavâda meant to glorify the knowledge of the food of the Prâna, not an injunction of the permission of all food.--This the Sûtra indicates in the words, 'and there is permission of all food
in danger of life.' That means: Only in danger of life, in cases of highest need, food of any kind is permitted to be eaten. 'On account of scripture showing this.' For scripture shows that the rishi Kâkrâyana when in evil plight proceeded to eat unlawful food. In the brâhmana beginning, 'when the Kurus had been destroyed by hailstones,' it is told how the rishi Kâkrâyana having fallen into great wretchedness ate the beans half eaten by a chief, but refused to drink what had been offered on the ground of its being a mere leaving; and explained his proceeding as follows: 'I should not have lived if I had not eaten them; but water I can drink wherever I like.' And again on the following day he ate the stale beans left by himself and another person. Scripture, in thus showing how the stale leaving of a leaving was eaten, intimates as its principle that in order to preserve one's life when in danger one may eat even unlawful food. That, on the other hand, in normal circumstances not even a man possessing knowledge must do this, appears from Kâkrâyana refusing to drink. From this it follows that the passage, 'For to him who knows this,' &c., is an arthavâda.
309:1 The passage quoted occurs in the Veda under the heading of the darsapûrnamâsa. But as Pûshan has no share in the fundamental form of that sacrifice, we conclude that the injunction implied in the passage is valid for those vikritis of the darsapûrnamâsa in which offerings are made to Pûshan.