From d15a1970c153fe85761ccb88441832ba856aec1e Mon Sep 17 00:00:00 2001 From: Wan-Teh Chang Date: Wed, 8 Nov 2023 21:05:15 -0800 Subject: Delete -Wdeclaration-after-statement Older versions of MSVC do not allow declarations after statements in C files. We don't need to support those versions of MSVC now. Use -std=gnu99 instead of -std=gnu89. Change-Id: I76ba962f5a2bca30d6a5b2b05c5786507398ad32 --- CHANGELOG | 5 +++++ configure | 6 ++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index f932f6bf4..5a8605a73 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +20yy-mm-dd v1.14.0 "V Duck" + This release drops support for old C compilers, such as Visual Studio 2012 + and older, that disallow mixing variable declarations and statements (a C99 + feature). + 2023-09-29 v1.13.1 "Ugly Duckling" This release contains two security related fixes. One each for VP8 and VP9. diff --git a/configure b/configure index 434c43792..6b910160a 100755 --- a/configure +++ b/configure @@ -643,7 +643,6 @@ process_toolchain() { if enabled gcc; then enabled werror && check_add_cflags -Werror check_add_cflags -Wall - check_add_cflags -Wdeclaration-after-statement check_add_cflags -Wdisabled-optimization check_add_cflags -Wextra-semi check_add_cflags -Wextra-semi-stmt @@ -670,9 +669,8 @@ process_toolchain() { if enabled mips || [ -z "${INLINE}" ]; then enabled extra_warnings || check_add_cflags -Wno-unused-function fi - # Enforce c89 for c files. Don't be too strict about it though. Allow - # gnu extensions like "//" for comments. - check_cflags -std=gnu89 && add_cflags_only -std=gnu89 + # Enforce C99 for C files. Allow GNU extensions. + check_cflags -std=gnu99 && add_cflags_only -std=gnu99 # Avoid this warning for third_party C++ sources. Some reorganization # would be needed to apply this only to test/*.cc. check_cflags -Wshorten-64-to-32 && add_cflags_only -Wshorten-64-to-32 -- cgit v1.2.3