From: Nathan Sidwell <nathan@codesourcery.com>
To: Doug Gregor <doug.gregor@gmail.com>
Cc: GCC Patches <gcc-patches@gcc.gnu.org>
Subject: Re: PING: C++0x decltype patch
Date: Thu, 26 Jul 2007 19:29:00 -0000 [thread overview]
Message-ID: <46A8EC73.80105@codesourcery.com> (raw)
In-Reply-To: <24b520d20707251228m32ccd1bcs6af46b72c0598238@mail.gmail.com>
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
next prev parent reply other threads:[~2007-07-26 18:48 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-25 19:31 Doug Gregor
2007-07-26 7:54 ` Paolo Carlini
2007-07-26 8:04 ` Paolo Carlini
2007-07-26 8:13 ` Andrew Pinski
2007-07-26 9:06 ` Paolo Carlini
2007-07-26 19:29 ` Nathan Sidwell [this message]
2007-07-27 17:11 ` Doug Gregor
2007-07-27 17:31 ` Nathan Sidwell
2007-07-27 18:03 ` Doug Gregor
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46A8EC73.80105@codesourcery.com \
--to=nathan@codesourcery.com \
--cc=doug.gregor@gmail.com \
--cc=gcc-patches@gcc.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).