Andres Freund <andres@anarazel.de> writes:
> It turns out to not work terribly well. gcc, quite reasonably, warns about the
> pragma used in .c files, and there's no easy way that I found to have autoconf
> name its test .h. We could include a test header in the compile test, but that
> also adds some complication. As gcc has supported the pragma since 2000, I
> think a simple
> #ifdef __GNUC__
> #define HAVE_PRAGMA_SYSTEM_HEADER 1
> #endif
> should suffice.
We might find that some GCC-impostor compilers have trouble with it,
but if so we can adjust the #ifdef here.
Getting nitpicky, I suggest calling it "HAVE_PRAGMA_GCC_SYSTEM_HEADER"
to align better with what you actually have to write. Also:
+ * Newer versions the perl headers trigger a lot of warnings with our compiler
"Newer versions of ..." please. Otherwise LGTM.
> Should we backpatch this? Given the volume of warnings it's probably a good
> idea. But I'd let it step in HEAD for a few days of buildfarm coverage first.
+1 to both points.
regards, tom lane