]> granicus.if.org Git - libvpx/commitdiff
enforce some c89 restrictions
authorJohann <johannkoenig@google.com>
Tue, 5 Feb 2019 02:18:11 +0000 (18:18 -0800)
committerJohann <johannkoenig@google.com>
Tue, 5 Feb 2019 22:03:21 +0000 (14:03 -0800)
Block "for (int i;;)" style declarations.

Use --std=gnu89 to avoid enforcing c89-style comments.

Change-Id: Ia7d1405eac647d04e92513c047773695e8d7dc6e

configure

index c8f1d35edf6edcedb5a205f5328c5c83367cfff0..e91b57a86bbdd79aa09e6e132b9cdc21af3afe75 100755 (executable)
--- 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