Introduce show warning flag.

Close #1267.