Related Rule
United Kingdom of Great Britain and Northern Ireland
Practice Relating to Rule 20. Advance Warning
The UK Military Manual (1958) states:
If military exigencies permit, and unless surprise is considered to be an essential element of success, the commander of an attacking force must do all in his power to warn the authorities of a defended place before commencing a bombardment. There is, however, no obligation to give notice of an intended assault. Should there be no civilians left in the area, no such notice is required. 
United Kingdom, The Law of War on Land being Part III of the Manual of Military Law, The War Office, HMSO, 1958, § 291; see also The Law of Armed Conflict, D/DAT/13/35/66, Army Code 71130 (Revised 1981), Ministry of Defence, prepared under the Direction of The Chief of the General Staff, 1981, Section 4, pp. 13–14, § 4(c).
The UK LOAC Pamphlet (1981) states: “Effective advance warning must be given of attacks which may affect the civilian population, unless circumstances do not permit.” 
United Kingdom, The Law of Armed Conflict, D/DAT/13/35/66, Army Code 71130 (Revised 1981), Ministry of Defence, prepared under the Direction of The Chief of the General Staff, 1981, Section 4, pp. 13–14, § 4(c).
The UK LOAC Manual (2004) states:
There is a duty to give advance warning of an attack that “may” affect the civilian population, unless circumstances do not permit. Obviously, the point does not arise as a matter of law if military operations are being conducted in an area where there is no civilian population nor if the attack is not going to affect the civilian population at all. In other cases, the warning must be given in advance and it must be effective. The object of warnings is to enable civilians to take shelter or leave the area and to enable the civil defence authorities to take appropriate measures. To be effective the warning must be in time, sufficiently specific and comprehensible to enable them to do this. 
United Kingdom, The Manual of the Law of Armed Conflict, Ministry of Defence, 1 July 2004, § 5.32.8.
In its chapter on air operations, the manual states: “Unless circumstances do not permit it, effective advance warning must be given of air bombardment that may affect the civilian population.” 
United Kingdom, The Manual of the Law of Armed Conflict, Ministry of Defence, 1 July 2004, § 12.26.
It is reported that, during the war in the South Atlantic, UK forces gave prior notice of their intention to bomb Goose Green and specified that such notice was given in accordance with the relevant laws. 
War in the Falklands: the Campaign in Pictures, Sunday Express Magazine Team, London, 1982, Report on UK Practice, 1997, Chapter 1.6.
In 2008, in response to a question in the House of Commons, the UK Secretary of State for Defence wrote: “Significant resources and effort are put into understanding properly the operational environment, including details of the civilian population who wherever possible are warned of impending operations.” 
United Kingdom, House of Commons, Written Statement by the Secretary of State for Defence, Hansard, 23 February 2009, Vol. 488, Written Statements, col. 18W.