Remove struct keyword in range-based for
authorSimon Marchi <simon.marchi@polymtl.ca>
Wed, 3 Oct 2018 18:34:18 +0000 (14:34 -0400)
committerSimon Marchi <simon.marchi@polymtl.ca>
Wed, 3 Oct 2018 21:51:35 +0000 (17:51 -0400)
commit8634679f82df75cf482b0c0814c2b3865da91d22
treead1a5d08b6d0ef8b6d5e0551cc8b01dfd69447b8
parentf35d5adea1cee8ce9141ad85a7e59d008c2e4d42
Remove struct keyword in range-based for

I get the following error with gcc 6.3.0:

/home/simark/src/binutils-gdb/gdb/dwarf2read.c: In function 'void read_func_scope(die_info*, dwarf2_cu*)':
/home/simark/src/binutils-gdb/gdb/dwarf2read.c:13838:12: error: types may not be defined in a for-range-declaration [-Werror]
       for (struct symbol *sym : template_args)
            ^~~~~~

Removing the struct keyword fixes it.

gdb/ChangeLog:

* dwarf2read.c (read_func_scope): Remove struct keyword in
range-based for.
gdb/ChangeLog
gdb/dwarf2read.c