Mine (s4) has already gone to 60°C+ without any problems. However, remember that every piece of electronic is sensitive to heat, especially computers. The pieces in a phone for example are so small, the electrical connections so tiny, at high heat they can melt. During summer you should never leave your phone in your car and don't use a windshield holder. Instead, get a holder for the auxiliary exhaust. This way the a/c will keep your phone cool and safe while driving.
Also, there are kernels that support thermal control. It allows you to setup maximum temperatures. If they are reached, the cpu will automatically underclock to avoid creating more heat due to higher power consumption.
Sent from my HTC One S using xda app-developers app