8292008: Transition the JDK to the common standard of C11
Reviewed-by: erikj
This commit is contained in:
parent
6f297346dc
commit
6076128996
@ -167,7 +167,7 @@ AC_DEFUN([FLAGS_SETUP_WARNINGS],
|
||||
CFLAGS_WARNINGS_ARE_ERRORS="-WX"
|
||||
|
||||
WARNINGS_ENABLE_ALL="-W3"
|
||||
DISABLED_WARNINGS="4800"
|
||||
DISABLED_WARNINGS="4800 5105"
|
||||
;;
|
||||
|
||||
gcc)
|
||||
@ -535,20 +535,10 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS_HELPER],
|
||||
fi
|
||||
|
||||
# CFLAGS C language level for JDK sources (hotspot only uses C++)
|
||||
# Ideally we would have a common level across all toolchains so that all sources
|
||||
# are sure to conform to the same standard. Unfortunately neither our sources nor
|
||||
# our toolchains are in a condition to support that. But what we loosely aim for is
|
||||
# C99 level.
|
||||
if test "x$TOOLCHAIN_TYPE" = xgcc || test "x$TOOLCHAIN_TYPE" = xclang || test "x$TOOLCHAIN_TYPE" = xxlc; then
|
||||
# Explicitly set C99. clang and xlclang support the same flag.
|
||||
LANGSTD_CFLAGS="-std=c99"
|
||||
LANGSTD_CFLAGS="-std=c11"
|
||||
elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
|
||||
# MSVC doesn't support C99/C11 explicitly, unless you compile as C++:
|
||||
# LANGSTD_CFLAGS="-TP"
|
||||
# but that requires numerous changes to the sources files. So we are limited
|
||||
# to C89/C90 plus whatever extensions Visual Studio has decided to implement.
|
||||
# This is the lowest bar for shared code.
|
||||
LANGSTD_CFLAGS=""
|
||||
LANGSTD_CFLAGS="-std:c11"
|
||||
fi
|
||||
TOOLCHAIN_CFLAGS_JDK_CONLY="$LANGSTD_CFLAGS $TOOLCHAIN_CFLAGS_JDK_CONLY"
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user