Section 5 IPC talks about the laws as well as provisions of this code which will not be applicable to the categories which have already existing laws to deal with the respective matters.
Section 5- Certain laws not to be affected by this Act
Sec 5 IPC specifically states that nothing in this Act shall affect the provisions of any Act for punishing and desertion of officers, soldiers, sailors, or airmen in the service of the Government of India or the provisions of any special or local law.
In simpler terms, this section, IPC 5, exempts the jurisdiction of IPC in the cases related to the officers engaged in the service of the Government of India. Some of these issues are the desertion of officers, soldiers, sailors or the airmen.
The issues related to the mutiny( rebellion against the constituted government) and desertion of officers are dealt with the separate laws. For example, in case of any issue that has arisen in the Indian army, in order to resolve such an issue, there is Army Act 1950, for the Navy personnel it is Navy Act 1957 and for the Air Force here is Air Force Act 1950 and Air Force and Army Laws (Amendment ) Act, 1975.
Section 5 of the Indian Penal Code somehow is a saving clause as it excludes the operation of the IPC in the cases where separate provisions or special laws have been made to deal with such issues.
Officers engaged in the Government services are provided with this privilege as they are serving the nation. Treating them in the same manner as all offenders are treated under the Indian Penal Code may not be right.
If there are situations where the person has been discharged or dismissed from his duty from the services and he is no longer involved in the service of serving the nation, in that case, the provisions of IPC will be accordingly applicable to such person.
The introductory sections of the code clearly specify that no person shall be discriminated on the basis of his nationality, colour caste, creed, and rank. If such a person has committed an offence that is against public policy, against the general public, wrong against the society, he shall be duly punished under the provisions of the Indian Penal Code and shall be liable for punishment if any.
Also, it depends on the gravity and nature, whether the offence committed by the person is a bailable offence or not. As per the law of Natural Justice, a person shall be granted bail until the offence against him is proved in the court of law and he is held guilty for that. Denying a person from getting bail also leads to the violation of his Fundamental Right.
Hence, from the above-stated sec 5 Indian Penal Code, it can be better understood that the Act provides a saving clause and excludes its jurisdiction over the matters for which there are separate provisions or separate laws.