diff options
author | Alan Modra <amodra@gmail.com> | 2020-02-19 13:11:17 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-02-19 13:11:17 +1030 |
commit | 2d0e121701a95e0f37af02bc622393b1ccd88c76 (patch) | |
tree | a4b58444775f737757aa6c813c0812648b9f78f4 | |
parent | 2e3cd5d013cee36c5bc26c0468d471878300ed22 (diff) | |
download | gdb-2d0e121701a95e0f37af02bc622393b1ccd88c76.zip gdb-2d0e121701a95e0f37af02bc622393b1ccd88c76.tar.gz gdb-2d0e121701a95e0f37af02bc622393b1ccd88c76.tar.bz2 |
c99 elfxx-riscv.c fix
We can't use c99 without enabling c99 support for older compilers
that don't enable c99 by default. So if you want to use c99 contructs
in binutils you'll need to first arrange for -std=c99 to be passed to
older compilers.
* elfxx-riscv.c (riscv_multi_letter_ext_valid_p): Don't use C99.
-rw-r--r-- | bfd/ChangeLog | 4 | ||||
-rw-r--r-- | bfd/elfxx-riscv.c | 10 |
2 files changed, 9 insertions, 5 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog index e2f236f..9e3190d 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,7 @@ +2020-02-19 Alan Modra <amodra@gmail.com> + + * elfxx-riscv.c (riscv_multi_letter_ext_valid_p): Don't use C99. + 2020-02-13 H.J. Lu <hongjiu.lu@intel.com> * plugin.c (try_load_plugin): Make plugin_list_iter an argument diff --git a/bfd/elfxx-riscv.c b/bfd/elfxx-riscv.c index 0a0711e..dc6db0c 100644 --- a/bfd/elfxx-riscv.c +++ b/bfd/elfxx-riscv.c @@ -1401,11 +1401,11 @@ static bfd_boolean riscv_multi_letter_ext_valid_p (const char *ext, const char *const *known_exts) { - for (size_t i = 0; known_exts[i]; ++i) - { - if (!strcmp (ext, known_exts[i])) - return TRUE; - } + size_t i; + + for (i = 0; known_exts[i]; ++i) + if (!strcmp (ext, known_exts[i])) + return TRUE; return FALSE; } |