This is the mail archive of the gdb-testers@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[binutils-gdb] Canonicalize conversion operators


*** TEST RESULTS FOR COMMIT c8ba13ad37c98262b94f99cc4f84ac0066c48cc2 ***

Author: Keith Seitz <keiths@redhat.com>
Branch: master
Commit: c8ba13ad37c98262b94f99cc4f84ac0066c48cc2

Canonicalize conversion operators

Consider a conversion operator such as:

operator foo const* const* ();

There are two small parser problems, highlighted by this test:

(gdb) p operator foo const* const*
There is no field named operatorfoo const* const *

GDB is looking up the symbol "operatorfoo const* const*" -- it is missing a
space between the keyword "operator" and the type name "foo const* const*".

Additionally, this input of the user-defined type needs to be canonicalized
so that different "spellings" of the type are recognized:

(gdb) p operator const foo* const *
There is no field named operator const foo* const *

gdb/ChangeLog:

	* c-exp.y (oper): Canonicalize conversion operators of user-defined
	types.
	Add whitespace to front of type name.

gdb/testsuite/ChangeLog:

	* gdb.cp/cpexprs.cc (base) <operator fluff const* const*>: New
	method.
	(main): Call it.
	* gdb.cp/cpexprs.exp: Add new conversion operator to test matrix.
	Add additional user-defined conversion operator tests.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]