The welfare of pigs is assured by Council Directive 2008/120/EC.
It applies to all categories of pig and lays down minimum standards for their protection:
Improving the quality of the flooring surfaces
Increasing the living space available for sows and gilts
Introducing higher level of training and competence on welfare issues for personnel
Setting requirements for light and maximum noise levels
Providing permanent access to fresh water and to materials for rooting and playing
Setting a minimum weaning age of four weeks
In particular with effect from 1st January 2013, pregnant sows must be kept in groups instead of individual stalls during part of their pregnancy - a major improvement for the welfare of sows in the EU. Indeed apart from some exceptions (farrowing sows and boars) all pigs are to be raised in groups and must be provided with permanent access to drinking water and food of appropriate quality at regular intervals. They must also have permanent access to a sufficient quantity of enrichment materials that does not compromise their health and enables them to carry out proper investigation and manipulation activities and fulfil their behavioural needs.
For full details please refer to the directive.
Please refer to the EFSA page for their scientific opinions on the welfare aspects of pig farming.