From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6432 invoked by alias); 26 Jul 2007 18:48:32 -0000 Received: (qmail 6423 invoked by uid 22791); 26 Jul 2007 18:48:32 -0000 X-Spam-Check-By: sourceware.org Received: from mail.codesourcery.com (HELO mail.codesourcery.com) (65.74.133.4) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 26 Jul 2007 18:48:29 +0000 Received: (qmail 8640 invoked from network); 26 Jul 2007 18:48:27 -0000 Received: from unknown (HELO ?192.168.44.101?) (nathan@127.0.0.2) by mail.codesourcery.com with ESMTPA; 26 Jul 2007 18:48:27 -0000 Message-ID: <46A8EC73.80105@codesourcery.com> Date: Thu, 26 Jul 2007 19:29:00 -0000 From: Nathan Sidwell User-Agent: Thunderbird 1.5.0.12 (X11/20070604) MIME-Version: 1.0 To: Doug Gregor CC: GCC Patches Subject: Re: PING: C++0x decltype patch References: <24b520d20707251228m32ccd1bcs6af46b72c0598238@mail.gmail.com> In-Reply-To: <24b520d20707251228m32ccd1bcs6af46b72c0598238@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2007-07/txt/msg01944.txt.bz2 Doug Gregor wrote: > It's been about two weeks since I submitted the latest decltype patch: > > http://gcc.gnu.org/ml/gcc-patches/2007-07/msg01058.html > > Since then, decltype has been accepted into C++0x, in exactly the same > form as it is implemented in the patch. > > Okay for mainline? > > - Doug Index: cp/semantics.c + case BIT_FIELD_REF: + sorry ("bit-field accesses in a decltype expression"); + return error_mark_node; + default: + if (TYPE_P (expr) || DECL_P (expr)) + error ("argument to decltype must be an expression"); + else + sorry ("unhandled decltype expression kind: %s", + tree_code_name[(int) TREE_CODE (expr)]); why sorry and not gcc_assert or gcc_unreachable? + if (TREE_CODE (expr) == CALL_EXPR + && (fndecl = get_callee_fndecl (expr)) + && (fndecl != error_mark_node)) + else if ((type = is_bitfield_expr_with_lowered_type (expr))) ow :) can we avoid assignments in conditionals here? Index: cp/parser.c +static tree +cp_parser_decltype (cp_parser *parser) here you parse tentatively, but don't appear to be committing to the tentative parse when it succeeds. Also, I can't see where decltype is gated on using c++0x extensions nathan -- Nathan Sidwell :: http://www.codesourcery.com :: CodeSourcery nathan@codesourcery.com :: http://www.planetfall.pwp.blueyonder.co.uk