ref: f7779e73901d0288df7119dfcb8086fe1710cbda
parent: b5c811738513ce3e53d2cfcefc3a863bd7f21701
parent: 060491ca21225166aa535bc1479eb0a33fb2ceb6
author: Johann Koenig <johannkoenig@google.com>
date: Tue Feb 5 18:29:51 EST 2019
Merge "enforce some c89 restrictions"
--- a/configure
+++ b/configure
@@ -625,6 +625,9 @@
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