configure: Check for GCC diagnostic pragma support inside of functions