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.
This commit is contained in:
Michael Forney
2021-05-01 00:55:16 -07:00
committed by Alan Modra
parent 70993db314
commit 4896932e62
2 changed files with 11 additions and 3 deletions

View 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);