[RFA] gdb/13483
Keith Seitz
keiths@redhat.com
Fri Aug 31 21:06:00 GMT 2012
Hi,
The bug in $SUBJECT talks about changing gdb to allow certain
conversions to boolean during function calls.
The attached patch changes rank_one_type to fully implement the C++
standard [as of n3290 draft] for boolean conversions (section 4.12.1,
conv.bool). I've re-purposed the BOOL_PTR_CONVERSION_BADNESS and changed
that to a more generic BOOL_CONVERSION_BADNESS which includes all of
these cases.
[No regressions on x86_64 native and native-gdbserver.]
Comments/questions/concerns?
Keith
ChangeLog
2012-08-31 Keith Seitz <keiths@redhat.com>
PR gdb/13483
* gdbtypes.h (BOOL_PTR_CONVERSION_BADNESS): Rename to ...
(BOOL_CONVERSION_BADNESS): ... this.
* gdbtypes.c (BOOL_PTR_CONVERSION_BADNESS): Likewise.
(rank_one_type): Allow all boolean conversions
permitted by the standard.
testsuite/ChangeLog
2012-08-31 Keith Seitz <keiths@redhat.com>
PR gdb/13483
* gdb.cp/converts.cc (A::A): Add ctor.
(A::member_): Add member.
(enum my_enum): New enumeration.
(main): Add calls to foo1_7 with various
permitted arguments.
* gdb.cp/converts.exp: Add tests for boolean
conversions permitted by the standard.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 13483.patch
Type: text/x-patch
Size: 4679 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/gdb-patches/attachments/20120831/006a203d/attachment.bin>
More information about the Gdb-patches
mailing list