PING: C++0x decltype patch
Nathan Sidwell
nathan@codesourcery.com
Thu Jul 26 19:29:00 GMT 2007
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
More information about the Gcc-patches
mailing list