This revision was automatically updated to reflect the committed changes.
Closed by commit rL300845: [Utility] Placate another GCC warning. (authored by
davide).
Changed prior to commit:
https://reviews.llvm.org/D32137?vs=95485&id=95961#toc
Repository:
rL LLVM
https://reviews.llvm.org/D3213
davide added a comment.
In https://reviews.llvm.org/D32137#731727, @labath wrote:
> Thanks for digging into this, I've learned something new today. Fixing this
> with a cast seems reasonable then.
Me too, apparently C++ integer promotion is less obvious than I thought ;)
https://reviews.llvm
labath added a comment.
Thanks for digging into this, I've learned something new today. Fixing this
with a cast seems reasonable then.
https://reviews.llvm.org/D32137
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/c
sas accepted this revision.
sas added inline comments.
This revision is now accepted and ready to land.
Comment at: source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.cpp:59
+ assert(m_num_registers ==
+ static_cast(m_registers_count[gpr_registers_count] +
+
davide added a comment.
Reference for the future
(http://www.open-std.org/jtc1/sc22/open/n2356/conv.html [conv.prom1])
https://reviews.llvm.org/D32137
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/l
davide added a subscriber: nlewycky.
davide added a comment.
And I was wrong. @nlewycky explained on IRC:
14:23 < nlewycky> gcc is correct, in 'char + char' each char gets promoted to
'int' first then summed, then you've got an unsigned int == int comparison
14:23 < nlewycky> uint8_t and uns
davide added a comment.
I reduced it:
https://gist.github.com/dcci/01c10b405041fa8d139a4f71aec102f7
https://reviews.llvm.org/D32137
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits
davide added a comment.
I'm getting more convinced the warning emitted by GCC is bogus
/home/davide/work/llvm-lldb/tools/lldb/source/Plugins/Process/Utility/RegisterContextPOSIX_mips64.cpp:58:26:
warning: comparison between signed and unsigned integer expressions
[-Wsign-compare]
assert
labath added a comment.
I am confused. `m_registers_count` is declared as `uint8_t` at
`RegisterContextPOSIX_mips64.h:67`...
https://reviews.llvm.org/D32137
___
lldb-commits mailing list
lldb-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mai
davide created this revision.
For reference/discussion.
GCC complains about signed-vs-unsigned comparison. I'm actually surprised that
`m_registers_count` is a `signed` integer, as I can hardly imagine a negative
register count. I'm under the impression that we could change
`m_register_count` f
10 matches
Mail list logo