dwarf: Don't omit second operand of '?' operator
authorMichael Forney <mforney@mforney.org>
Sat, 1 May 2021 07:55:16 +0000 (00:55 -0700)
committerAlan Modra <amodra@gmail.com>
Fri, 7 May 2021 07:24:00 +0000 (16:54 +0930)
This is a GNU C extension and is not valid in ISO C.

* dwarf.c: Don't omit second operand of '?' operator.

binutils/ChangeLog
binutils/dwarf.c

index 5d87b196346f7800744772179f29d1b8e3058fa9..72f69739771864b53077c978efc937045e422e04 100644 (file)
@@ -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
index adb5c130ccd182b9a667a603bb21457611fd595b..d93d9239684ad6f46f3a14317eefab035d7bb40b 100644 (file)
@@ -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);
This page took 0.02844 seconds and 4 git commands to generate.