Use of 0W40 oil in engine that calls for 5W30 -Bad or good idea?

In the summer time you can use an oil 5W40 or 10W 30, in winter should work 5W20 or 0W30.