enable shadow warnings; reduce scope of a local; set -ansi only for gcc