]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Fortran: Silence a clang warning (suggesting a brace) in io.cc
authorMartin Jambor <mjambor@suse.cz>
Fri, 4 Jul 2025 15:50:42 +0000 (17:50 +0200)
committerMartin Jambor <jamborm@gcc.gnu.org>
Fri, 4 Jul 2025 15:51:30 +0000 (17:51 +0200)
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.

gcc/fortran/ChangeLog:

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

* io.cc (format_asterisk): Add a brace around static initialization
location part of the field locus.

gcc/fortran/io.cc

index 7466d8fe0945c2a912b903a2caea1c57e92b1902..4d28c2c90ba1360db57fca17a0e8ea5f39ce788c 100644 (file)
@@ -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
 {