The attack of environmental aggressive agents progressively reduces the structural reliability of buildings and infrastructures and, in the worst exposition conditions, may even lead to their collapse in the long period. A change in the material and sectional characteristics of a structural element, due to the environmental damaging effects, changes its mechanical behaviour and varies both the internal stress redistribution and the kinematics through which it reaches its ultimate state. To identify such a behaviour, the evolution of both the damaging process and its mechanical consequences have to be taken into account. This paper presents a computational approach for the analysis of reinforced and prestressed concrete elements under sustained loading conditions and subjected to given damaging scenarios. The effects of the diffusion of aggressive agents, of the onset and development of the corrosion state in the reinforcement and the corresponding mechanical response are studied. As known, the corrosion on the reinforcing bars influences the damaging rate in the cracking pattern evolution; hence, the damage development and the mechanical behaviours are considered as coupled phenomena. The reliability of such an approach is validated in modelling the diffusion of the aggressive agents and the changes in the mechanical response of simple structural elements whose experimental behaviour is reported in Literature. A second set of analyses studies the effects of the corrosion of the tendons of a P.C. beam and explores potentially unexpected structural responses caused by corrosion under different aggressive exposition. The role of the different types and of the different positions of the damaging agents is discussed. In particular, it is shown how the collapse mode of the beam may switch from flexural to shear type, in case corrosion is caused by a localized chloride attack in the shear span.