Skip to content

Commit 63a7bd4

Browse files
authored
Merge pull request #1185 from jimklimov/gcc-49
Problem: earlier changes to warning flags in configure.ac lost logic
2 parents ab838d7 + bb95fcf commit 63a7bd4

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

configure.ac

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -405,10 +405,12 @@ AS_IF([test "x$enable_Werror" = "xyes" || test "x$enable_Werror" = "xauto"],
405405
])])])
406406
AS_IF([test -n "$CPP"],[AS_IF([$CPP --version 2>&1 | grep 'Free Software Foundation' > /dev/null && test "x$GCC" = "xyes"],
407407
[AC_MSG_NOTICE([Enabling pedantic errors for GNU CPP preprocessor])
408-
CPPFLAGS="$CPPFLAGS -pedantic -Werror -Wall -Wc++-compat"],
408+
CPPFLAGS="$CPPFLAGS -pedantic -Werror -Wall -Wc++-compat"
409+
],
409410
[AS_IF([$CXX --version 2>&1 | grep 'clang version' > /dev/null],
410411
[AC_MSG_NOTICE([Enabling pedantic errors for clang CPP preprocessor])
411-
CPPFLAGS="$CPPFLAGS -pedantic -Werror -Wall -Wc++-compat"],
412+
CPPFLAGS="$CPPFLAGS -pedantic -Werror -Wall -Wc++-compat"
413+
],
412414
[AC_MSG_NOTICE([Not enabling pedantic errors: preprocessor not supported by this recipe (not GNU or clang CPP)])
413415
AS_IF([test "x$enable_Werror" = "xyes"], [AC_MSG_ERROR([--enable-Werror=yes was requested and can not be satisfied for CPP: $CPP])])
414416
])])])

zproject_autotools.gsl

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1215,10 +1215,20 @@ AS_IF([test "x$enable_Werror" = "xyes" || test "x$enable_Werror" = "xauto"],
12151215
])])])
12161216
AS_IF([test -n "$CPP"],[AS_IF([$CPP --version 2>&1 | grep 'Free Software Foundation' > /dev/null && test "x$GCC" = "xyes"],
12171217
[AC_MSG_NOTICE([Enabling pedantic errors for GNU CPP preprocessor])
1218-
CPPFLAGS="$CPPFLAGS -pedantic -Werror -Wall -Wc++-compat"],
1218+
.if project.use_cxx
1219+
CPPFLAGS="$CPPFLAGS -pedantic -Werror -Wall"
1220+
.else
1221+
CPPFLAGS="$CPPFLAGS -pedantic -Werror -Wall -Wc++-compat"
1222+
.endif
1223+
],
12191224
[AS_IF([$CXX --version 2>&1 | grep 'clang version' > /dev/null],
12201225
[AC_MSG_NOTICE([Enabling pedantic errors for clang CPP preprocessor])
1221-
CPPFLAGS="$CPPFLAGS -pedantic -Werror -Wall -Wc++-compat"],
1226+
.if project.use_cxx
1227+
CPPFLAGS="$CPPFLAGS -pedantic -Werror -Wall"
1228+
.else
1229+
CPPFLAGS="$CPPFLAGS -pedantic -Werror -Wall -Wc++-compat"
1230+
.endif
1231+
],
12221232
[AC_MSG_NOTICE([Not enabling pedantic errors: preprocessor not supported by this recipe (not GNU or clang CPP)])
12231233
AS_IF([test "x$enable_Werror" = "xyes"], [AC_MSG_ERROR([--enable-Werror=yes was requested and can not be satisfied for CPP: $CPP])])
12241234
])])])

0 commit comments

Comments
 (0)