Question regarding C++ frontend
Peter Collingbourne
pcc03@doc.ic.ac.uk
Thu Jun 5 16:44:00 GMT 2008
On Sat, May 03, 2008 at 08:29:25AM -0400, Doug Gregor wrote:
> INNERMOST_TEMPLATE_ARGS can be used to get at the "innermost" TREE_VEC
> of template arguments for a class template specialzation such as
> foo<int>::bar<long>. CLASSTYPE_USE_TEMPLATE != 0 tells you whether a
> RECORD_TYPE is actually a template
Doug,
Thank you for your response and sorry for the delay. Unfortunately
CLASSTYPE_USE_TEMPLATE does not seem to have this property when the
non-template is an inner class of a template. For example, the
record_type t pertaining to a class outer<int>::inner_noargs :
(gdb) pt
<record_type 0x2ae12cb18900 inner_noargs type_5 type_6 VOID
align 8 symtab 0 alias set -1 canonical type 0x2ae12cb18900 context <record_type 0x2ae12cb180c0 outer>
no-binfo use_template=1 interface-unknown
chain <type_decl 0x2ae12cb189c0 inner_noargs>>
(gdb) print t->type.lang_specific->u.c.use_template
$4 = 1
Thanks,
--
Peter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <https://gcc.gnu.org/pipermail/gcc/attachments/20080605/1ea47263/attachment.sig>
More information about the Gcc
mailing list