This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: gcc 4.8 and N3276
- From: Paolo Carlini <paolo dot carlini at oracle dot com>
- To: Joe Gottman <joegottman at verizon dot net>
- Cc: gcc at gcc dot gnu dot org
- Date: Sat, 23 Mar 2013 11:48:30 +0100
- Subject: Re: gcc 4.8 and N3276
- References: <514D170A dot 3030805 at verizon dot net>
On 03/23/2013 03:44 AM, Joe Gottman wrote:
Does gcc 4.8 include the changes to decltype specified in N3276
(http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3276.pdf)?
If not, can we expect these for 4.8.1?
Yes, in 4.8.1, Jason backported:
2013-03-22 Jason Merrill <jason@redhat.com>
N3276
PR c++/52748
* cp-tree.h (tsubst_flags): Add tf_decltype.
* call.c (build_cxx_call): Don't build a temporary if it's set.
(build_over_call): Make sure it's only passed to build_cxx_call.
* parser.c (cp_parser_primary_expression): Add decltype_p parm.
(cp_parser_unary_expression): Likewise.
(cp_parser_cast_expression): Likewise.
(cp_parser_binary_expression): Likewise.
(cp_parser_assignment_expression): Likewise.
(cp_parser_postfix_expression): Likewise. Pass tf_decltype.
(cp_parser_explicit_instantiation): Add decltype_p. Force a
temporary for a call on the LHS of a comma.
(cp_parser_decltype): Pass true to decltype_p parms.
* pt.c (tsubst) [DECLTYPE_TYPE]: Pass tf_decltype.
(tsubst_copy_and_build): Pass tf_decltype down only for
CALL_EXPR and the RHS of COMPOUND_EXPR.
* tree.c (build_cplus_new): Call complete_type_or_maybe_complain.
Paolo.