This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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]

[PATCH] PR libstdc++/80276 fix pretty printers for array smart pointers


This fixes unique_ptr<T[]> so it doesn't print as unique_ptr<T>, and
fixes a problem in the type-printers that can result in a gdb.error
exception (see https://sourceware.org/PR22686).

	PR libstdc++/80276
	* python/libstdcxx/v6/printers.py (SharedPointerPrinter)
	(UniquePointerPrinter): Print correct template argument, not type of
	the pointer.
	(TemplateTypePrinter._recognizer.recognize): Handle failure to lookup
	a type.
	* testsuite/libstdc++-prettyprinters/cxx11.cc: Test unique_ptr of
	array type.
	* testsuite/libstdc++-prettyprinters/cxx17.cc: Test shared_ptr and
	weak_ptr of array types.

Tested x86_64-linux, committed to trunk.


Attachment: patch.txt
Description: Text document


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