Make -WNNN pragma function scoped.

There's no reason for -WNNN pragma to behave differently from normal
option pragma.

Closes GH-915.