Hi,

when GCC is built with clang, it suggests that we add a brace to the
initialization of format_asterisk:

  gcc/fortran/io.cc:32:16: warning: suggest braces around initialization of 
subobject [-Wmissing-braces]

So this patch does that to silence it.

Bootstrapped and tested on x86_64-linx.  OK for master?

Alternatively, as with all of these clang warning issues, I'm
perfectly happy to add an entry to contrib/filter-clang-warnings.py to
ignore the warning instead.

Thanks,

Martin



gcc/fortran/ChangeLog:

2025-06-24  Martin Jambor  <mjam...@suse.cz>

        * io.cc (format_asterisk): Add a brace around static initialization
        location part of the field locus.
---
 gcc/fortran/io.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/fortran/io.cc b/gcc/fortran/io.cc
index 7466d8fe094..4d28c2c90ba 100644
--- a/gcc/fortran/io.cc
+++ b/gcc/fortran/io.cc
@@ -29,7 +29,7 @@ along with GCC; see the file COPYING3.  If not see
 
 gfc_st_label
 format_asterisk = {0, NULL, NULL, -1, ST_LABEL_FORMAT, ST_LABEL_FORMAT, NULL,
-                  0, {NULL, NULL}, NULL, 0};
+                  0, {NULL, {NULL}}, NULL, 0};
 
 typedef struct
 {
-- 
2.49.0

Reply via email to