Remove struct keyword in range-based for loop
authorSimon Marchi <simon.marchi@polymtl.ca>
Sat, 14 Jul 2018 02:06:34 +0000 (22:06 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Sat, 14 Jul 2018 02:06:34 +0000 (22:06 -0400)
Fix this with  gcc 6.3.0:

/home/simark/src/binutils-gdb/gdb/symfile.c: In function 'void set_objfile_default_section_offset(objfile*, const section_addr_info&, CORE_ADDR)':
/home/simark/src/binutils-gdb/gdb/symfile.c:2114:14: error: types may not be defined in a for-range-declaration [-Werror]
   for (const struct other_sections *objf_sect : objf_addrs_sorted)
              ^~~~~~
gdb/ChangeLog:

* symfile.c (set_objfile_default_section_offset): Remove struct
keyword.

gdb/ChangeLog
gdb/symfile.c

index d4b0eb1d3e63b81f289b1d38c566da60d4c9bc1c..ba4eba73fb549d75e8ddd535654ee7ef3ceaa995 100644 (file)
@@ -1,3 +1,8 @@
+2018-07-13  Simon Marchi  <simon.marchi@polymtl.ca>
+
+       * symfile.c (set_objfile_default_section_offset): Remove struct
+       keyword.
+
 2018-07-14  Stafford Horne  <shorne@gmail.com>
 
        * (Responsible Maintainers): Add myself as or1k maintainer.
index 62b38bd618251708d9d62195e6b355ad3e43fe24..3614aa3f95559365fb329af75819e521b0ce98e0 100644 (file)
@@ -2111,7 +2111,7 @@ set_objfile_default_section_offset (struct objfile *objf,
 
   std::vector<const struct other_sections *>::iterator addrs_sorted_iter
     = addrs_sorted.begin ();
-  for (const struct other_sections *objf_sect : objf_addrs_sorted)
+  for (const other_sections *objf_sect : objf_addrs_sorted)
     {
       const char *objf_name = addr_section_name (objf_sect->name.c_str ());
       int cmp = -1;
This page took 0.044962 seconds and 4 git commands to generate.