RFA: fix PR 9164
Daniel Jacobowitz
drow@false.org
Sun Jan 4 03:29:00 GMT 2009
On Sat, Jan 03, 2009 at 02:19:53PM -0700, Tom Tromey wrote:
> This patch fixes PR 9164.
>
> The bug is that the result of sizeof has signed type, not unsigned.
> The C and C++ standards require an unsigned type here.
>
> This fix defers the choice of type to the language, using the existing
> language-arch machinery. I fixed the C language family, including
> ObjC, but I left the other languages unchanged. I think the language
> maintainers will have to make a change here, if one is needed or
> desired. (FWIW I don't think Java needs a change, since I don't think
> it is possible to invoke sizeof when Java is the selected language.)
>
> Built and regtested on x86-64 (compile farm).
> New test case included.
Before adding all this, do you know of any language where the signed
behavior is correct?
--
Daniel Jacobowitz
CodeSourcery
More information about the Gdb-patches
mailing list