https://bz.apache.org/bugzilla/show_bug.cgi?id=63633

--- Comment #4 from Rainer Jung <[email protected]> ---
What about the following more fine grained approach: not sure, whether
"diagnostic ignored "-Werror=comment"" really reverses the effect of maintainer
mode (warnings plus error escalation) or would only reverse an explicitly set
"-Werror=comment" which we don't have. But its worth a try:


Index: modules/filters/config.m4
===================================================================
--- modules/filters/config.m4   (revision 1864429)
+++ modules/filters/config.m4   (working copy)
@@ -114,10 +114,6 @@
     if test -n "${xml2_path}" ; then
       ac_cv_libxml2=yes
       XML2_INCLUDES="${xml2_path}"
-      dnl libxml2 includes unicode/*.h files which uses C++ comments
-      if test "$GCC" = "yes"; then
-        APR_ADDTO(MOD_CPPFLAGS, ["-Wno-error=comment"])
-      fi
     else
       ac_cv_libxml2=no
     fi
Index: modules/filters/mod_proxy_html.c
===================================================================
--- modules/filters/mod_proxy_html.c    (revision 1864429)
+++ modules/filters/mod_proxy_html.c    (working copy)
@@ -29,9 +29,28 @@
 #define VERBOSEB(x) if (verbose) {x}
 #endif

+/* libxml2 includes unicode/*.h files which uses C++ comments */
+#if defined(__GNUC__)
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
+#pragma GCC diagnostic push
+#endif
+#pragma GCC diagnostic ignored "-Werror=comment"
+#elif defined(__clang__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Werror=comment"
+#endif
+
 /* libxml2 */
 #include <libxml/HTMLparser.h>

+#if defined(__GNUC__)
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
+#pragma GCC diagnostic pop
+#endif
+#elif defined(__clang__)
+#pragma clang diagnostic pop
+#endif
+
 #include "http_protocol.h"
 #include "http_config.h"
 #include "http_log.h"
Index: modules/filters/mod_xml2enc.c
===================================================================
--- modules/filters/mod_xml2enc.c       (revision 1864429)
+++ modules/filters/mod_xml2enc.c       (working copy)
@@ -23,9 +23,30 @@

 #include <ctype.h>

+/* libxml2 includes unicode/*.h files which uses C++ comments */
+#if defined(__GNUC__)
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
+#pragma GCC diagnostic push
+#endif
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2)
+#pragma GCC diagnostic ignored "-Werror=comment"
+#endif
+#elif defined(__clang__)
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Werror=comment"
+#endif
+
 /* libxml2 */
 #include <libxml/encoding.h>

+#if defined(__GNUC__)
+#if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6)
+#pragma GCC diagnostic pop
+#endif
+#elif defined(__clang__)
+#pragma clang diagnostic pop
+#endif
+
 #include "http_protocol.h"
 #include "http_config.h"
 #include "http_log.h"

-- 
You are receiving this mail because:
You are the assignee for the bug.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to