I have a few files where i'd like to be strict about warnings, and i use GCC to build my project.
I've tried #pragma GCC diagnostic error "-Wall"
as per https://gcc.gnu.org/onlinedocs/gcc-4.7.2/gcc/Diagnostic-Pragmas.html, but it fails to account for some other enabled warning types:
foo.c:666:6: warning: passing argument 2 of 'bar' from incompatible pointer type [-Wincompatible-pointer-types]
Is there a way to enable -Werror for the file like it was supplied from the command line (or, at least, for the implicitly enabled set of warnings), so any warning would trigger an error?