[PATCH 1/2] gdbsupport: Fix a type of sentinel
Tom Tromey
tom@tromey.com
Fri Jan 31 10:09:00 GMT 2020
>>>>> "Simon" == Simon Marchi <simark@simark.ca> writes:
Simon> Can you please indicate in your commit message the reason why you need this
Simon> change? I presume it fixes some compilation error, in which case please
Simon> indicate at least what is the error message and what is the compiler you are
Simon> using (name and version). If you are cross compiling, it can also be good
Simon> to mention that as well.
The bug here is that if NULL is defined as 0, then the sentinel will be
handled incorrectly via varargs if sizeof(void*) > sizeof(int) -- the
value passed in will be narrower than what the callee reads. Jan did a
pass once, ages ago, to fix all of these, but it's easy for new ones to
slip in, since it's not always incorrect.
I like the nullptr idea. Also replacing concat calls with std::string
in appropriate spots seems like a good idea too.
Tom
More information about the Gdb-patches
mailing list