Input Voltage in regulator output pin
Be aware that other (non ST) devices do have warnings about reverse powering 7805 regulators. Such as this from TI: -



The above talks about protecting the device in the case of the output voltage being taken greater than 7 volts so, if you were using the above device you would be OK feeding the output with 5 volts but, this may not be the case for the ST device because the word "reverse" is not mentioned in the data sheet as far as I can tell. This makes me doubt that the ST device is capable of sustained reverse operation.

It's safer all round to use a reverse diode as shown (in my opinion).