c-common.c (struct c_common_resword): Add __underlying_type.
authorPaolo Carlini <paolo.carlini@oracle.com>
Mon, 25 Apr 2011 22:27:19 +0000 (22:27 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Mon, 25 Apr 2011 22:27:19 +0000 (22:27 +0000)
commita0d260fcc5f6fe1a246e8ee40235a825369f3627
treeb836cd0e728b772f3240bdb6c981032673cb2745
parentd95f258e9027e7d797bde4eace3e29ab7d9382db
c-common.c (struct c_common_resword): Add __underlying_type.

/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.

From-SVN: r172943
26 files changed:
gcc/ChangeLog
gcc/c-family/c-common.c
gcc/c-family/c-common.h
gcc/cp/ChangeLog
gcc/cp/cp-objcp-common.c
gcc/cp/cp-tree.def
gcc/cp/cp-tree.h
gcc/cp/cxx-pretty-print.c
gcc/cp/error.c
gcc/cp/mangle.c
gcc/cp/parser.c
gcc/cp/pt.c
gcc/cp/semantics.c
gcc/cp/tree.c
gcc/cp/typeck.c
gcc/testsuite/ChangeLog
gcc/testsuite/g++.dg/ext/underlying_type1.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ext/underlying_type10.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ext/underlying_type2.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ext/underlying_type3.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ext/underlying_type4.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ext/underlying_type5.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ext/underlying_type6.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ext/underlying_type7.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ext/underlying_type8.C [new file with mode: 0644]
gcc/testsuite/g++.dg/ext/underlying_type9.C [new file with mode: 0644]