From: Johann Date: Tue, 5 Feb 2019 02:18:11 +0000 (-0800) Subject: enforce some c89 restrictions X-Git-Tag: v1.8.1~257^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=060491ca21225166aa535bc1479eb0a33fb2ceb6;p=libvpx enforce some c89 restrictions Block "for (int i;;)" style declarations. Use --std=gnu89 to avoid enforcing c89-style comments. Change-Id: Ia7d1405eac647d04e92513c047773695e8d7dc6e --- diff --git a/configure b/configure index c8f1d35ed..e91b57a86 100755 --- a/configure +++ b/configure @@ -625,6 +625,9 @@ 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 # 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