aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.cp/namespace.cc
AgeCommit message (Collapse)AuthorFilesLines
2020-06-23Improve -Wunused-value testcase build failures fixGary Benson1-11/+11
This commit improves upon my previous -Wunused-value fix by replacing the various dummy variables with casts to void, as suggested by Pedro. gdb/testsuite/ChangeLog: * gdb.cp/namespace.cc: Improve -Wunused-value fix. * gdb.cp/nsimport.cc: Likewise. * gdb.cp/nsnested.cc: Likewise. * gdb.cp/nsnoimports.cc: Likewise. * gdb.cp/nsusing.cc: Likewise. * gdb.cp/smartp.cc: Likewise. * gdb.python/py-pp-integral.c: Likewise. * gdb.python/py-pp-re-notag.c: Likewise.
2020-06-23Avoid testcase build failures with -Wunused-valueGary Benson1-11/+11
A number of testcases fail to build with -Wunused-value enabled. This commit adds dummy values to avoid this. gdb/testsuite/ChangeLog: * gdb.cp/namespace.cc: Avoid build failure with -Wunused-value. * gdb.cp/nsimport.cc: Likewise. * gdb.cp/nsnested.cc: Likewise. * gdb.cp/nsnoimports.cc: Likewise. * gdb.cp/nsusing.cc: Likewise. * gdb.cp/smartp.cc: Likewise. * gdb.python/py-pp-integral.c: Likewise. * gdb.python/py-pp-re-notag.c: Likewise.
2010-01-19gdbTom Tromey1-0/+6
PR c++/8000: * dwarf2read.c (partial_die_parent_scope): Put enumeration type into parent scope, and enumerator into grandparent scope. gdb/testsuite PR c++/8000: * gdb.cp/namespace.exp: Use new enum. Fix line numbers in existing tests. * gdb.cp/namespace.cc (AAA::SomeEnum): New enum. (main): Use AAA::SomeEnum.
2009-12-28 * gdb.base/find.c (main): Reference search buffers.Daniel Jacobowitz1-0/+5
* gdb.base/included.c (main): Reference integer. * gdb.base/ptype.c (charfoo): Declare. (intfoo): Call charfoo. * gdb.base/scope0.c (useitp): New function. (usestatics): Use useitp. (useit): Add a type for val. * gdb.base/scope1.c (useit1): Take a pointer argument. (usestatics1): Update calls to useit1. * gdb.cp/call-c.cc: Declare foo. (main): Call foo. * gdb.cp/m-static.cc (main): Reference test4.elsewhere. * gdb.cp/namespace.cc (ensureOtherRefs): Declare. (main): Call C::ensureRefs and ensureOtherRefs. * gdb.cp/namespace1.cc (C::ensureOtherRefs): Also reference int variables. (ensureOtherRefs): New function. * gdb.cp/overload.cc (main): Call all overloadNamespace variants. * gdb.cp/templates.cc (main): Call t5i.value.
2004-01-232004-01-23 David Carlton <carlton@kealia.com>David Carlton1-0/+7
* gdb.cp/namespace.cc (C::ensureRefs): New. * gdb.cp/namespace1.cc (C::ensureOtherRefs): New.
2004-01-142004-01-14 David Carlton <carlton@kealia.com>David Carlton1-0/+9
Change symbols for C++ nested types to contain the fully qualified name, if possible. (At least in the DWARF-2 case.) Partial fix for PR's c++/57, c++/488, c++/539, c++/573, c++/609, c++/832, c++/895. * c-exp.y: Update copyright: (qualified_type): Handle types nested within classes. * cp-namespace.c: Update comments. (cp_set_block_scope): Delete #if 0. (cp_lookup_nested_type): Handle types nested within classes. * dwarf2read.c: (scan_partial_symbols): Call add_partial_structure when appropriate. (add_partial_symbol): Add the name of the enclosing namespace to types. (pdi_needs_namespace): New. (add_partial_namespace): Tweak comment. (add_partial_structure): New. (psymtab_to_symtab_1): Initialize processing_current_prefix here... (process_die): instead of here. (read_structure_scope): Try to figure out the name of the class or namespace that the structure might be defined within. (read_enumeration): Generate fully-qualified names, if possible. (read_namespace): Don't set name to NULL. (die_specification): New. (new_symbol): Generate fully-qualified names for types. (read_type_die): Determine appropriate prefix. (determine_prefix): New. (typename_concat): New. (class_name): New. * valops.c: Update copyright. (value_aggregate_elt): Pass NOSIDE to value_struct_elt_for_reference. (value_struct_elt_for_reference): Make static, add NOSIDE parameter, call value_maybe_namespace_elt as a last resort. (value_namespace_elt): Break out code into value_maybe_namespace_elt. (value_maybe_namespace_elt): New. 2004-01-14 David Carlton <carlton@kealia.com> * gdb.cp/namespace.exp: Add tests involving classes defined within namespaces. * gdb.cp/namespace.cc (C::CClass): New. * gdb.cp/namespace1.cc: Update copyright. (C::OtherFileClass): New.
2003-09-252003-09-25 David Carlton <carlton@kealia.com>David Carlton1-0/+19
* c-exp.y: Include cp-support.h. Add qualified_type. (yylex): Delete nested type hack; add comments. * cp-namespace.c (cp_lookup_nested_type): New function. * cp-support.h: Declare cp_lookup_nested_type. * eval.c (evaluate_subexp_standard): Call value_aggregate_elt instead of value_struct_elt_for_reference. * valops.c: Include cp-support.h. (value_aggregate_elt): New function. (value_namespace_elt): Ditto. (value_struct_elt_for_reference): Make static. * value.h: Delete declaration of value_struct_elt_for_reference; add declaration for value_aggregate_elt. * Makefile.in (c-exp.tab.o): Depend on $(cp_support_h). (valops.o): Ditto. 2003-09-25 David Carlton <carlton@kealia.com> * gdb.cp/namespace.exp: Tweak comments. Add non-quoted versions of some print tests, where appropriate. Add tests for C::D::cd, E::ce, F::cXfX, G::XgX. * gdb.cp/namespace.cc: Add XgX, cXfX, ce.
2003-08-232003-08-22 Michael Chastain <mec@shout.net>Michael Chastain1-0/+163
* gdb.cp: New directory. * gdb.cp/*: Copy from gdb.c++/*. * gdb.c++/*: Remove. * Makefile.in: Change gdb.c++ to gdb.cp. * configure.in: Ditto. * configure: Regnerate.