Kaydet (Commit) 3a4860a7 authored tarafından Andrzej Hunt's avatar Andrzej Hunt Kaydeden (comit) Caolán McNamara

Force --std=gnu89 for clang.

clang builds with a more modern standard by default

On Linux gcc builds with gnu89 by default. On Windows MSVC only
supports C90. Hence it makes sense to force gnu89 for clang to
catch potential gnu89/C90 incompatibilities locally.

(C90 and gnu89 appear to be quite close, however using C90
with clang results in warnings and errors to do with comments
on lines with code (-Wcomment), and also the lack of inline
(instead you would use __inline -- this is #define'd in for
 Windows only).)

Change-Id: I569af7541b86aa0f83ebb66770d43737bac5d21f
Reviewed-on: https://gerrit.libreoffice.org/9904Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 18898e13
......@@ -3245,6 +3245,10 @@ if test "$GCC" = "yes"; then
AC_MSG_RESULT([Clang $CLANG_FULL_VERSION, $CLANGVER])
AC_DEFINE_UNQUOTED(CLANG_FULL_VERSION,$CLANG_FULL_VERSION)
fi
# On Windows MSVC only supports C90 so force gnu89 (especially in clang) to
# to catch potential gnu89/C90 incompatibilities locally.
CFLAGS="$CFLAGS -std=gnu89"
fi
AC_SUBST(COM_GCC_IS_CLANG)
......
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