You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucy.apache.org by nw...@apache.org on 2016/07/06 11:19:04 UTC

[5/6] lucy-clownfish git commit: Don't compile with -pedantic under MinGW

Don't compile with -pedantic under MinGW

When using the MSVCRT, -pedantic complains about %I64 format specifiers.
The only workaround is to remove this flag.


Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/1b135aac
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/1b135aac
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/1b135aac

Branch: refs/heads/master
Commit: 1b135aacd9fe7fd3069f6559e3f8192a0b347fd3
Parents: 8610c2e
Author: Nick Wellnhofer <we...@aevum.de>
Authored: Wed Jul 6 12:16:06 2016 +0200
Committer: Nick Wellnhofer <we...@aevum.de>
Committed: Wed Jul 6 12:16:06 2016 +0200

----------------------------------------------------------------------
 runtime/common/charmonizer.c    | 9 +++++++--
 runtime/common/charmonizer.main | 9 +++++++--
 2 files changed, 14 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/1b135aac/runtime/common/charmonizer.c
----------------------------------------------------------------------
diff --git a/runtime/common/charmonizer.c b/runtime/common/charmonizer.c
index df01ba1..fda1309 100644
--- a/runtime/common/charmonizer.c
+++ b/runtime/common/charmonizer.c
@@ -8765,8 +8765,13 @@ S_add_compiler_flags(struct chaz_CLI *cli) {
     chaz_CFlags *extra_cflags = chaz_CC_get_extra_cflags();
 
     if (chaz_Probe_gcc_version_num()) {
-        chaz_CFlags_append(extra_cflags,
-            "-pedantic -Wall -Wextra -Wno-variadic-macros");
+        if (!chaz_CC_is_mingw()) {
+            /* When using the MSVCRT, -pedantic complains about %I64 format
+             * specifiers.
+             */
+            chaz_CFlags_append(extra_cflags, "-pedantic");
+        }
+        chaz_CFlags_append(extra_cflags, "-Wall -Wextra -Wno-variadic-macros");
         if (strcmp(chaz_CLI_strval(cli, "host"), "perl") == 0) {
             chaz_CFlags_append(extra_cflags, "-DPERL_GCC_PEDANTIC");
         }

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/1b135aac/runtime/common/charmonizer.main
----------------------------------------------------------------------
diff --git a/runtime/common/charmonizer.main b/runtime/common/charmonizer.main
index b8a2c7c..7c8bdc7 100644
--- a/runtime/common/charmonizer.main
+++ b/runtime/common/charmonizer.main
@@ -185,8 +185,13 @@ S_add_compiler_flags(struct chaz_CLI *cli) {
     chaz_CFlags *extra_cflags = chaz_CC_get_extra_cflags();
 
     if (chaz_Probe_gcc_version_num()) {
-        chaz_CFlags_append(extra_cflags,
-            "-pedantic -Wall -Wextra -Wno-variadic-macros");
+        if (!chaz_CC_is_mingw()) {
+            /* When using the MSVCRT, -pedantic complains about %I64 format
+             * specifiers.
+             */
+            chaz_CFlags_append(extra_cflags, "-pedantic");
+        }
+        chaz_CFlags_append(extra_cflags, "-Wall -Wextra -Wno-variadic-macros");
         if (strcmp(chaz_CLI_strval(cli, "host"), "perl") == 0) {
             chaz_CFlags_append(extra_cflags, "-DPERL_GCC_PEDANTIC");
         }