about summary refs log tree commit diff
path: root/absl/copts
diff options
context:
space:
mode:
Diffstat (limited to 'absl/copts')
-rw-r--r--absl/copts/GENERATED_AbseilCopts.cmake1
-rw-r--r--absl/copts/GENERATED_copts.bzl1
-rw-r--r--absl/copts/copts.py5
3 files changed, 7 insertions, 0 deletions
diff --git a/absl/copts/GENERATED_AbseilCopts.cmake b/absl/copts/GENERATED_AbseilCopts.cmake
index 80c981930767..d02ea193c1c1 100644
--- a/absl/copts/GENERATED_AbseilCopts.cmake
+++ b/absl/copts/GENERATED_AbseilCopts.cmake
@@ -20,6 +20,7 @@ list(APPEND GCC_FLAGS
     "-Wvarargs"
     "-Wvla"
     "-Wwrite-strings"
+    "-Wno-missing-field-initializers"
     "-Wno-sign-compare"
 )
 
diff --git a/absl/copts/GENERATED_copts.bzl b/absl/copts/GENERATED_copts.bzl
index a001347d4909..d23f40698e93 100644
--- a/absl/copts/GENERATED_copts.bzl
+++ b/absl/copts/GENERATED_copts.bzl
@@ -21,6 +21,7 @@ GCC_FLAGS = [
     "-Wvarargs",
     "-Wvla",
     "-Wwrite-strings",
+    "-Wno-missing-field-initializers",
     "-Wno-sign-compare",
 ]
 
diff --git a/absl/copts/copts.py b/absl/copts/copts.py
index 4da8442de028..5a2d91a3aa6e 100644
--- a/absl/copts/copts.py
+++ b/absl/copts/copts.py
@@ -10,6 +10,7 @@ compilation options:
 The generated copts are consumed by configure_copts.bzl and
 AbseilConfigureCopts.cmake.
 """
+
 COPT_VARS = {
     "GCC_FLAGS": [
         "-Wall",
@@ -24,6 +25,10 @@ COPT_VARS = {
         "-Wvarargs",
         "-Wvla",  # variable-length array
         "-Wwrite-strings",
+        # gcc-4.x has spurious missing field initializer warnings.
+        # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=36750
+        # Remove when gcc-4.x is no longer supported.
+        "-Wno-missing-field-initializers",
         # Google style does not use unsigned integers, though STL containers
         # have unsigned types.
         "-Wno-sign-compare",