[gcc(refs/users/marxin/heads/opt-parse-enum-sanity)] Wrap array in ctor with braces.

Martin Liska marxin@gcc.gnu.org
Tue Mar 17 16:05:54 GMT 2020


https://gcc.gnu.org/g:2e03285180248fd7ce582e357db4284426659e51

commit 2e03285180248fd7ce582e357db4284426659e51
Author: Martin Liska <mliska@suse.cz>
Date:   Wed Mar 4 09:31:05 2020 +0100

    Wrap array in ctor with braces.
    
            * method.c: Wrap array in ctor with braces in order
            to silent clang warnings.

Diff:
---
 gcc/cp/ChangeLog | 5 +++++
 gcc/cp/method.c  | 6 +++---
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 590c8988666..34ff88ee033 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@
+2020-03-04  Martin Liska  <mliska@suse.cz>
+
+	* method.c: Wrap array in ctor with braces in order
+	to silent clang warnings.
+
 2020-03-03  Jason Merrill  <jason@redhat.com>
 	    Marek Polacek  <polacek@redhat.com>
 
diff --git a/gcc/cp/method.c b/gcc/cp/method.c
index 790d5704092..f10cfecaae8 100644
--- a/gcc/cp/method.c
+++ b/gcc/cp/method.c
@@ -900,9 +900,9 @@ struct comp_cat_info_t
 };
 static const comp_cat_info_t comp_cat_info[cc_last]
 = {
-   { "partial_ordering", "equivalent", "greater", "less", "unordered" },
-   { "weak_ordering", "equivalent", "greater", "less" },
-   { "strong_ordering", "equal", "greater", "less" }
+   { "partial_ordering", { "equivalent", "greater", "less", "unordered" } },
+   { "weak_ordering", { "equivalent", "greater", "less" } },
+   { "strong_ordering", { "equal", "greater", "less" } }
 };
 
 /* A cache of the category types to speed repeated lookups.  */


More information about the Gcc-cvs mailing list