Turn on warnings for legacy cfg syntax and convert the stdlib

This is sitting on top of #17621.

Closes #17490