diff options
author | dgregor <dgregor@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-07-27 17:43:05 +0000 |
---|---|---|
committer | dgregor <dgregor@138bc75d-0d04-0410-961f-82ee72b054a4> | 2007-07-27 17:43:05 +0000 |
commit | 34da880074f38f11309e262bdfdc10cd1c197957 (patch) | |
tree | 1fd8c965b4122258e1d88e04db3ecb09a3757908 /gcc/c-common.h | |
parent | d598b5d86b330d16ef1f2181f4bc52f2b01ab283 (diff) | |
download | ppe42-gcc-34da880074f38f11309e262bdfdc10cd1c197957.tar.gz ppe42-gcc-34da880074f38f11309e262bdfdc10cd1c197957.zip |
2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
* typeck.c (structural_comptypes): Compare DECLTYPE_TYPE nodes.
* cp-tree.def (DECLTYPE_TYPE): New.
* error.c (dump_type): Dump DECLTYPE_TYPE nodes.
(dump_type_prefix): Ditto.
(dump_type_suffix): Ditto.
* tree.c (DECLTYPE_TYPE): Walk DECLTYPE_TYPE nodes.
* mangle.c (write_type): Handle DECLTYPE_TYPE.
* cp-tree.h (IS_AGGR_TYPE): DECLTYPE_TYPE nodes can be aggregate
types.
(DECLTYPE_TYPE_EXPR): New.
(DECLTYPE_TYPE_ID_EXPR_OR_MEMBER_ACCESS_P): New.
(finish_declared_type): Declare.
* cxx-pretty-print.c (pp_cxx_type_specifier_seq): Print
DECLTYPE_TYPE nodes.
(pp_cxx_type_id): Ditto.
* pt.c (for_each_template_parm_r): Walk DECLTYPE_TYPE children.
(tsubst): Substitute into a DECLTYPE_TYPE node.
(tsubst_copy): Ditto.
(unify): Cannot deduce anything from TYPEOF_TYPE or DECLTYPE_TYPE
nodes.
(dependent_type_p_r): DECLTYPE_TYPE types are always dependent.
* semantics.c (finish_typeof): TYPEOF_TYPE types need to use
structural equality (because we can't hash the expressions).
(finish_declared_type): New.
* lex.c (reswords): Add "decltype" keyword.
* parser.c cp_lexer_next_token_is_decl_specifier_keyword
(cp_parser_postfix_expression): Add member_access_only_p to
restrict postfix expression to member access expressions.
(cp_parser_unary_expression): Update call to
cp_parser_postfix_expression to reflect new parameter.
(cp_parser_declared_type): New.
(cp_parser_simple_type_specifier): Parse decltype types.
2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
* c-common.h (enum rid): Add RID_DECLTYPE, update RID_LAST_CXX0X.
2007-07-27 Douglas Gregor <doug.gregor@gmail.com>
* g++.dg/cpp0x/decltype1.C: New.
* g++.dg/cpp0x/decltype2.C: New.
* g++.dg/cpp0x/decltype3.C: New.
* g++.dg/cpp0x/decltype4.C: New.
* g++.dg/cpp0x/decltype5.C: New.
* g++.dg/cpp0x/decltype6.C: New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@126991 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/c-common.h')
-rw-r--r-- | gcc/c-common.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/gcc/c-common.h b/gcc/c-common.h index 5417c8bb2e9..cb2c56bf5b8 100644 --- a/gcc/c-common.h +++ b/gcc/c-common.h @@ -101,7 +101,7 @@ enum rid RID_IS_UNION, /* C++0x */ - RID_STATIC_ASSERT, + RID_STATIC_ASSERT, RID_DECLTYPE, /* Objective-C */ RID_AT_ENCODE, RID_AT_END, @@ -119,7 +119,7 @@ enum rid RID_LAST_MODIFIER = RID_ONEWAY, RID_FIRST_CXX0X = RID_STATIC_ASSERT, - RID_LAST_CXX0X = RID_STATIC_ASSERT, + RID_LAST_CXX0X = RID_DECLTYPE, RID_FIRST_AT = RID_AT_ENCODE, RID_LAST_AT = RID_AT_IMPLEMENTATION, RID_FIRST_PQ = RID_IN, |