This is the mail archive of the
gcc-cvs@gcc.gnu.org
mailing list for the GCC project.
r201264 - in /branches/c++-concepts: ChangeLog....
- From: asutton at gcc dot gnu dot org
- To: gcc-cvs at gcc dot gnu dot org
- Date: Fri, 26 Jul 2013 10:59:08 -0000
- Subject: r201264 - in /branches/c++-concepts: ChangeLog....
Author: asutton
Date: Fri Jul 26 10:59:08 2013
New Revision: 201264
URL: http://gcc.gnu.org/viewcvs?rev=201264&root=gcc&view=rev
Log:
2013-07-25 Andrew Sutton <andrew.n.sutton@gmail.com>
* gcc/cp/parser.c (cp_parser_requires_expr): Update parser using new
requires expression nodes. Renamed some grammar productions to better
reflect the representation of the syntax. Create a new scope for requires
parameters.
(cp_parser_nested_requirement): Wrap results in a
NESTED_REQ node.
* gcc/cp/semantics.c (xvalue_result_type): New.
(trait_expr_value): Evaluate __is_convertible_to.
(finish_requires_expr): Implemented, along with other functions to
construct and evaluate nodes for template constraints.
(potential_constant_expression_1): Handle requires expressions.
(finish_template_requirements), (finish_requires_expr), etc:
Move to constraint.cc.
* gcc/cp/cp-tree.def: (REQUIRES_EXPR), (EXPR_REQ), (TYPE_REQ),
(NESTED_REQ), (VALIDEXPR_EXPR), (VALIDTYPE_EXPR), (CONSTEXPR_EXPR):
New.
* gcc/cp/cp-objcp-common.c (cp_common_init_ts): Make new nodes typed.
* gcc/cp/cp-tree.h (finish_expr_requirement),
(finish_type_requirement), (finish_nested_requirement),
(finish_validexpr_expr), (finish_validtype_expr),
(finish_constexpr_expr): New.
* gcc/cp/pt.c (convert_nontype_argument): Use can_convert_standard.
(retrieve_local_specialization), (register_local_specialization),
(extract_fnparm_pack): Make non-static.
(tsubst_expr): Substitution rules for requires expressions.
(instantiate_requirements): Move to constraints.cc
(tsubst_constraint): Remove.
* gcc/cp/call.c (can_convert): Allow user-defined conversions.
(can_convert_standard): New.
* gcc/cp/cvt.c (convert_to_reference): Use can_convert_standard.
* gcc/cp/search.c (check_final_overrider): Use can_cnvert_standard.
* gcc/cp/typeck.c (build_static_cast_1): Use can_convert_standard.
* gcc/cp/error.c (dump_expr): Pretty print new nodes.
* gcc/cp/cxx-pretty-print.c (pp_cxx_primary_expression): Pretty
print new expr/req nodes.
(pp_cxx_requires_expr): New along with related functions for
pretty printing requirements.
(pp_cxx_parameter_declaration_clause): Accommodate "raw" parameter
lists in addition to function decls.
(pp_cxx_requirement_parameter_list): Unified with parameter decl clause.
* gcc/cp/cxx-pretty-print.h (pp_cxx_requires_expr): New along with
related functions for pretty printing requirements.
* gcc/cp/logic.cc: Move header comments to top of file.
* gcc/cp/constraint.cc (reduce_requirements): Handle requires
expressions.
(diagnose_constraints): Rename and handle requires expressions.
Modified:
branches/c++-concepts/ChangeLog.concepts
branches/c++-concepts/gcc/cp/call.c
branches/c++-concepts/gcc/cp/constraint.cc
branches/c++-concepts/gcc/cp/cp-tree.h
branches/c++-concepts/gcc/cp/cxx-pretty-print.c
branches/c++-concepts/gcc/cp/cxx-pretty-print.h
branches/c++-concepts/gcc/cp/error.c
branches/c++-concepts/gcc/cp/logic.cc
branches/c++-concepts/gcc/cp/pt.c
branches/c++-concepts/gcc/cp/semantics.c