Re: [PATCH] c++: improve debug_tree for templated types/decls

2023-08-10 Thread Jason Merrill via Gcc-patches
We also need to constrain the kinds of decls that we test DECL_TEMPLATE_INFO on according to template_info_decl_check. -- >8 -- Subject: [PATCH] c++: improve debug_tree for templated types/decls gcc/cp/ChangeLog: * ptree.cc (cxx_print_decl): Check for DECL_LANG_SPECIFIC and

Re: [PATCH] c++: improve debug_tree for templated types/decls

2023-08-10 Thread Patrick Palka via Gcc-patches
> > @@ -124,27 +124,29 @@ cxx_print_decl (FILE *file, tree node, int indent) > > need_indent = false; > > } > > - if (VAR_OR_FUNCTION_DECL_P (node) > > + if (DECL_LANG_SPECIFIC (node) > > Hmm, won't this crash on a non-COMMON decl? Oops

Re: [PATCH] c++: improve debug_tree for templated types/decls

2023-08-08 Thread Jason Merrill via Gcc-patches
On 7/31/23 20:34, Patrick Palka wrote: Tested on x86_64-pc-linux-gnu, does this look OK for trunk? -- >8 -- gcc/cp/ChangeLog: * ptree.cc (cxx_print_decl): Check for DECL_LANG_SPECIFIC and TS_DECL_COMMON only when necessary. Print DECL_TEMPLATE_INFO for all decls that

[PATCH] c++: improve debug_tree for templated types/decls

2023-07-31 Thread Patrick Palka via Gcc-patches
Tested on x86_64-pc-linux-gnu, does this look OK for trunk? -- >8 -- gcc/cp/ChangeLog: * ptree.cc (cxx_print_decl): Check for DECL_LANG_SPECIFIC and TS_DECL_COMMON only when necessary. Print DECL_TEMPLATE_INFO for all decls that have it, not just VAR_DECL or