This is the mail archive of the 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]

[RFA] Add parsing support for C++ operators


The attached patch adds support to the parser for C++ operators. This has the additional benefit of negating the need to single-quote operator names during parsing, e.g., "print &foo::operator delete[] (void*)" now works.



2009-11-10  Keith Seitz  <>

	* c-expy. (operator_stoken): New function.
	(OPERATOR): New token.
	(NEW): New token.
	(DELETE): New token.
	(operator): New rule.
	(name): Add operator.
	(ident_tokens): Add "new", "delete", and "operator".
	* gdbtypes.c (rank_one_type): Don't complain about
	void pointer conversion badness if both types are
	void pointers.

2009-11-10  Keith Seitz  <>

	* gdb.cp/ (class foo): Add operators
	new[] and delete[].
	* gdb.cp/cplusfuncs.exp (dm_type_void): Change to
	(probe_demangler): Remove all single-quoting of
	method and variable names.
	(info_func_regexp): Remove the word "void" from any
	occurrence of "(void)".
	(print_addr_2): Remove all single-quoting of
	method names.
	(print_addr_2_kfail): Likewise.
	(print_addr): Single-quote C function names before
	passing to print_addr_2.
	(test_paddr_operator_functions): Remove single-quoting
	for method names.
	Add tests for operator new[] and operator delete[].

Attachment: cpp-operators.patch
Description: Text document

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