https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118837
--- Comment #6 from Tom Tromey ---
I also looked through the LLVM DWARF writer.
In part it is a bit nicer because it does:
void DwarfUnit::addConstantValue(DIE &Die, bool Unsigned, uint64_t Val) {
// FIXME: This is a bit conservative/simple
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118837
--- Comment #5 from Tom Tromey ---
> If the 64-bit value is
> negative, we emit DW_FORM_sdata, otherwise we emit whatever is smallest
> representation of the positive value (DW_FORM_data{1,2,4,8}, could perhaps
> use DW_FORM_udata).
I think I d
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118837
--- Comment #4 from Tom Tromey ---
(In reply to Jakub Jelinek from comment #3)
> And perhaps we could also try to optimize the DW_FORM_sdata cases if there
> is no ambiguity (e.g. for 8-bit signed contexts with negative value
> DW_FORM_data1 co
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118837
Jakub Jelinek changed:
What|Removed |Added
CC||jakub at gcc dot gnu.org,
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118837
--- Comment #2 from Richard Biener ---
I don't read any ambiguity. How DW_FORM_data1 255 is interpreted depends on
context - but if the context only says 'int', then this is not enough
context to decide if char 255 is supposed to be sign or
ze
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=118837
--- Comment #1 from Tom Tromey ---
Also there was an old thread about this:
https://lists.dwarfstd.org/pipermail/dwarf-discuss/2010-July/000862.html