aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.cp/converts.cc
AgeCommit message (Collapse)AuthorFilesLines
2013-01-23 * gdb.cp/converts.cc (main): Initialize 'a'.Tom Tromey1-1/+2
2012-09-16gdb/testsuite/Jan Kratochvil1-0/+4
Fix compatibility with old GCC (~4.1). * gdb.cp/converts.cc (my_enum_var): New variable.
2012-09-12 * gdb.cp/converts.cc (main): Comment out the pointer to booleanKeith Seitz1-0/+8
conversion statement.
2012-09-10 PR gdb/13483Keith Seitz1-1/+23
* 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. * 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.
2012-08-17 PR c++/13356Keith Seitz1-0/+8
* gdbtypes.c (strict_type_checking): New variable. (show_strict_type_checking): New function. (rank_one_type): Return NS_POINTER_INTEGER_CONVERSION_BADNESS if strict type checking is disabled. (_initialize_gdbtypes): Add "check type" subcommand. * gdbtypes.h (NS_INTEGER_POINTER_CONVERSION_BADNESS): New struct. PR c++/13356 * gdb.base/default.exp: Update all "check type" tests. * gdb.base/help.exp: Likewise. * gdb.base/setshow.exp: Likewise. * gdb.cp/converts.cc (foo1_type_check): New function. (foo2_type_check): New function. (foo3_type_check): New function. (main): Call new functions. * converts.exp: Add tests for integer-to-pointer conversions with/without strict type-checking. PR c++/13356 * gdb.texinfo (Type and Range Checking): Remove warning. Remove spurious commas. Update text and examples for re-implementation of set/show check type. (C and C++ Type and Range Checks): Likewise. * language.h (type_mode): Remove. (type_check): Remove. (struct language_defn): Remove la_type_check. (STRICT_TYPE): Remove unused macro. (type_error): Remove. * language.c (set_type_range_case): Renamed to ... (set_range_case): ... this. Update all callers. Remove type_mode/type_check. (type_mode): Remove. (type_check): Remove. (show_type_command): Remove. (set_type_command): Remove. (language_info): Remove type checking output. (type_error): Remove unused function. (range_error): Update comment. (unknown_language_defn): Remove la_type_check. (auto_language_defn): Likewise. (local_language_defn): Likewise. (_initialize_language): Remove "check type" subcommand. * ada-lang.c (ada_language_defn): Remove la_type_check. * c-lang.c (c_language_defn): Likewise. (cplus_language_defn): Likewise. (asm_language_defn): Likewise. (minimal_language_defn): Likewise. * d-lang.c (d_language_defn): Likewise. * f-lang.c (f_language_defn): Likewise. * go-lang.c (go_language_defn): Likewise. * jv-lang.c (java_language_defn): Likewise. * m2-lang.c (m2_language_defn): Likewise. * objc-lang.c (objc_language_defn): Likewise. * opencl-lang.c (opencl_language_defn): Likewise. * p-lang.c (pascal_language_defn): Likewise.
2011-10-14 PR c++/13225Keith Seitz1-0/+9
* gdb.cp/converts.cc (foo3_1): New function. (foo3_2): New functions. * gdb.cp/converts.exp: Add tests for int to pointer conversion and null pointer conversions of integer constant zero. Add test to check if all arguments are checked for incompatible conversion BADNESS.
2010-10-19Support pointer to bool conversion.Sami Wagiaalla1-2/+6
2010-10-19 Sami Wagiaalla <swagiaal@redhat.com> * gdbtypes.h: Introduce BOOL_PTR_CONVERSION_BADNESS. * gdbtypes.c (rank_one_type): Use BOOL_PTR_CONVERSION_BADNESS for conversion. Make all other conversions illegal. 2010-10-19 Sami Wagiaalla <swagiaal@redhat.com> * gdb.cp/converts.exp: Test pointer to bool conversion. Test pointer to long conversion. * gdb.cp/oranking.exp: Removed relevant kfail.
2010-10-14Fixed void* vs int* overload issue (PR C++/10343).Sami Wagiaalla1-0/+53
2010-10-14 Sami Wagiaalla <swagiaal@redhat.com> * gdbtypes.h: Create BASE_PTR_CONVERSION_BADNESS. * gdbtypes.c (rank_one_type): Move type comparison code out of here to... (types_equal): ...here. And changed it as follows: Outside of typedefs type must be of the same TYPE_CODE. When compairing two pointers or references they are equal if their targets are equal. Correct pointer conversions. 2010-10-14 Sami Wagiaalla <swagiaal@redhat.com> * gdb.cp/converts.cc: New test program. * gdb.cp/converts.exp: New test. * gdb.cp/overload.exp: Added test for void* vs int*. * gdb.cp/overload.exp: Ditto. * gdb.cp/oranking.exp: Removed related kfail.