Related Rule
South Africa
Practice Relating to Rule 37. Open Towns and Non-Defended Localities
South Africa’s LOAC Manual (1996) states: “It is prohibited to attack or bombard, by whatever means, undefended towns, villages, dwellings or buildings. A facility which is occupied by medical units alone is not regarded as defended.” 
South Africa, Presentation on the South African Approach to International Humanitarian Law, Appendix A, Chapter 4: International Humanitarian Law (The Law of Armed Conflict), National Defence Force, 1996, § 28(e).
The manual further states that “firing on localities which are undefended and without military significance” constitutes a grave breach of IHL. 
South Africa, Presentation on the South African Approach to International Humanitarian Law, Appendix A, Chapter 4: International Humanitarian Law (The Law of Armed Conflict), National Defence Force, 1996, § 38(b).
South Africa’s Revised Civic Education Manual (2004) states: “It is prohibited to attack or bombard, by whatever means, undefended towns, villages, dwellings and buildings. A facility which is occupied by medical units only, is not regarded as defended.” 
South Africa, Revised Civic Education Manual, South African National Defence Force, 2004, Chapter 4, § 50(e).
The manual also provides that “[a]ny attack on an undefended locality” is a grave breach of the law of armed conflict and a war crime. 
South Africa, Revised Civic Education Manual, South African National Defence Force, 2004, Chapter 4, § 57.
South Africa’s ICC Act (2002) reproduces the war crimes listed in the 1998 ICC Statute, including in international armed conflicts: “attacking or bombarding, by whatever means, towns, villages, dwellings or buildings which are undefended and which are not military objectives”. 
South Africa, ICC Act, 2002, Schedule 1, Part 3, § (b)(v).