The exceptions in sections 21, 22 and 23 do not extend to acts which are offences independently of any harm which they may cause, or be intended to cause, or be known to be likely to cause, to the person giving the consent, or on whose behalf the consent is given.
Illustration. Causing miscarriage (unless caused in good faith for the purpose of saving the life of the woman) is offence independently of any harm which it may cause or be intended to cause to the woman. Therefore, it is not an offence “by reason of such harm”; and the consent of the woman or of her guardian to the causing of such miscarriage does not justify the act.
Law reference / Bharatiya Nyaya Sanhita, 2023 / Chapter III
Section 29. Exclusion of acts which are offences independently of harm caused
GENERAL EXCEPTIONS
Please note: this text is the Bharatiya Nyaya Sanhita Bill, 2023 (Bill No. 121 of 2023, as introduced in the Lok Sabha). Parliament later passed a revised version as Act No. 45 of 2023, which is the law in force from 1 July 2024. Many section numbers differ (for example, murder is clause 101 here but section 103 in the Act), so use the IPC ↔ BNS table for the numbers of the Act and check the official text on India Code before quoting a section.