Commit 1144b350 authored by Vasil Velichkov's avatar Vasil Velichkov Committed by Lev Walkin

When -Wpedantic is not supported try the -pedantic instead

GCC prior to 4.8 does not supprot -Wpedantic.
See https://gcc.gnu.org/gcc-4.8/changes.html

The travis-ci currently builds with gcc-4.6.3

  $ gcc --version
  gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3
parent 3b434ca5
......@@ -98,7 +98,14 @@ SKELETONS_CFLAGS="${ADD_CFLAGS} ${SKELETONS_CFLAGS}"
AX_CHECK_COMPILE_FLAG([-std=c89],
[SKELETONS_CFLAGS="$SKELETONS_CFLAGS -std=c89"])
AX_CHECK_COMPILE_FLAG([-Wpedantic],
[SKELETONS_CFLAGS="$SKELETONS_CFLAGS -Wpedantic"])
[SKELETONS_CFLAGS="$SKELETONS_CFLAGS -Wpedantic"],
[
dnl When -Wpedantic is not supported try the -pedantic instead. (gcc-4.7)
dnl See https://gcc.gnu.org/gcc-4.8/changes.html
AX_CHECK_COMPILE_FLAG([-pedantic],
[SKELETONS_CFLAGS="$SKELETONS_CFLAGS -pedantic"], [], [-Werror])
],
[-Werror]) #clang 3.0 prints warning when the flag is not supported
AX_CHECK_COMPILE_FLAG([-Wno-duplicate-decl-specifier],
[SKELETONS_CFLAGS="$SKELETONS_CFLAGS -Wno-duplicate-decl-specifier"])
AC_SUBST(SKELETONS_CFLAGS)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment