summaryrefslogtreecommitdiff
path: root/gcc/cp/cp-tree.def
diff options
context:
space:
mode:
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2011-04-25 22:27:19 +0000
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>2011-04-25 22:27:19 +0000
commit8de5c43ea89970802e1e0aade14cb03909d15de1 (patch)
treeb836cd0e728b772f3240bdb6c981032673cb2745 /gcc/cp/cp-tree.def
parent61be8263aa3015c8f88d677477d928a4d2e894a3 (diff)
downloadgcc-8de5c43ea89970802e1e0aade14cb03909d15de1.tar.gz
/gcc
2011-04-25 Paolo Carlini <paolo.carlini@oracle.com> * c-family/c-common.c (struct c_common_resword): Add __underlying_type. * c-family/c-common.h (enum rid): Add RID_UNDERLYING_TYPE. /cp 2011-04-25 Paolo Carlini <paolo.carlini@oracle.com> * cp-tree.def: Add a new UNDERLYING_TYPE tree code. * cp-tree.h (enum cp_trait_kind): Add CPTK_UNDERLYING_TYPE, tidy. (UNDERLYING_TYPE_TYPE): Add. * cp-objcp-common.c (cp_common_init_ts): Mark UNDERLYING_TYPE as TS_COMMON. * parser.c (cp_lexer_next_token_is_decl_specifier_keyword, cp_parser_simple_type_specifier): Handle UNDERLYING_TYPE. (cp_parser_trait_expr): Deal with RID_UNDERLYING_TYPE; tidy. * semantics.c (finish_underlying_type): New. * typeck.c (structural_comptypes): Handle UNDERLYING_TYPE. * error.c (dump_type, dump_type_prefix, dump_type_suffix): Likewise. * cxx-pretty-print.c (p_cxx_type_id): Likewise. * tree.c (cp_walk_subtrees): Likewise. * pt.c (for_each_template_parm_r, tsubst, unify, dependent_type_p_r): Likewise. * mangle.c (write_type): Sorry for __underlying_type. * doc/extend.texi: Document __underlying_type. /testsuite 2011-04-25 Paolo Carlini <paolo.carlini@oracle.com> * g++.dg/ext/underlying_type1.C: New. * g++.dg/ext/underlying_type2.C: Likewise. * g++.dg/ext/underlying_type3.C: Likewise. * g++.dg/ext/underlying_type4.C: Likewise. * g++.dg/ext/underlying_type5.C: Likewise. * g++.dg/ext/underlying_type6.C: Likewise. * g++.dg/ext/underlying_type7.C: Likewise. * g++.dg/ext/underlying_type8.C: Likewise. * g++.dg/ext/underlying_type9.C: Likewise. * g++.dg/ext/underlying_type10.C: Likewise. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@172943 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/cp-tree.def')
-rw-r--r--gcc/cp/cp-tree.def6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/cp/cp-tree.def b/gcc/cp/cp-tree.def
index 42840a81c10..7bd35e0d6b2 100644
--- a/gcc/cp/cp-tree.def
+++ b/gcc/cp/cp-tree.def
@@ -2,7 +2,7 @@
additional tree codes used in the GNU C++ compiler (see tree.def
for the standard codes).
Copyright (C) 1987, 1988, 1990, 1993, 1997, 1998, 2003, 2004, 2005,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2010
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2010, 2011
Free Software Foundation, Inc.
Hacked by Michael Tiemann (tiemann@cygnus.com)
@@ -450,6 +450,10 @@ DEFTREECODE (LAMBDA_EXPR, "lambda_expr", tcc_exceptional, 0)
DECLTYPE_FOR_LAMBDA_RETURN is set if we want lambda return deduction. */
DEFTREECODE (DECLTYPE_TYPE, "decltype_type", tcc_type, 0)
+/* A type designated by `__underlying_type (type)'.
+ UNDERLYING_TYPE_TYPE is the type in question. */
+DEFTREECODE (UNDERLYING_TYPE, "underlying_type", tcc_type, 0)
+
/* Used to represent the template information stored by template
specializations.
The accessors are: