diff options
author | Michael Forney <mforney@mforney.org> | 2021-05-01 00:55:16 -0700 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2021-05-07 16:54:00 +0930 |
commit | 4896932e620876a1afa1c9e8d2b8a5e49aa53d53 (patch) | |
tree | f5491553bb426ac8f69ea5247b5fc278d214a9fc | |
parent | 70993db314dc42194478d2c47b67d89f285c054a (diff) | |
download | gdb-4896932e620876a1afa1c9e8d2b8a5e49aa53d53.zip gdb-4896932e620876a1afa1c9e8d2b8a5e49aa53d53.tar.gz gdb-4896932e620876a1afa1c9e8d2b8a5e49aa53d53.tar.bz2 |
dwarf: Don't omit second operand of '?' operator
This is a GNU C extension and is not valid in ISO C.
* dwarf.c: Don't omit second operand of '?' operator.
-rw-r--r-- | binutils/ChangeLog | 4 | ||||
-rw-r--r-- | binutils/dwarf.c | 10 |
2 files changed, 11 insertions, 3 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 5d87b19..72f6973 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,7 @@ +2021-05-07 Michael Forney <mforney@mforney.org> + + * dwarf.c: Don't omit second operand of '?' operator. + 2021-04-30 Nick Clifton <nickc@redhat.com> PR 27796 diff --git a/binutils/dwarf.c b/binutils/dwarf.c index adb5c13..d93d923 100644 --- a/binutils/dwarf.c +++ b/binutils/dwarf.c @@ -3826,9 +3826,13 @@ process_debug_info (struct dwarf_section * section, offset_size == 8 ? "64-bit" : "32-bit"); printf (_(" Version: %d\n"), compunit.cu_version); if (compunit.cu_version >= 5) - printf (_(" Unit Type: %s (%x)\n"), - get_DW_UT_name (compunit.cu_unit_type) ?: "???", - compunit.cu_unit_type); + { + const char *name = get_DW_UT_name (compunit.cu_unit_type); + + printf (_(" Unit Type: %s (%x)\n"), + name ? name : "???", + compunit.cu_unit_type); + } printf (_(" Abbrev Offset: 0x%s\n"), dwarf_vmatoa ("x", compunit.cu_abbrev_offset)); printf (_(" Pointer Size: %d\n"), compunit.cu_pointer_size); |