+2014-11-19 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/55425
+ * constexpr.c (constexpr_fn_retval): Accept __func__, __FUNCTION__,
+ and __PRETTY_FUNCTION__.
+
2014-11-18 Jason Merrill <jason@redhat.com>
PR c++/63924
return break_out_target_exprs (TREE_OPERAND (body, 0));
case DECL_EXPR:
- if (TREE_CODE (DECL_EXPR_DECL (body)) == USING_DECL)
- return NULL_TREE;
- return error_mark_node;
+ {
+ tree decl = DECL_EXPR_DECL (body);
+ if (TREE_CODE (decl) == USING_DECL
+ /* Accept __func__, __FUNCTION__, and __PRETTY_FUNCTION__. */
+ || DECL_ARTIFICIAL (decl))
+ return NULL_TREE;
+ return error_mark_node;
+ }
case CLEANUP_POINT_EXPR:
return constexpr_fn_retval (TREE_OPERAND (body, 0));
+2014-11-19 Paolo Carlini <paolo.carlini@oracle.com>
+
+ PR c++/55425
+ * g++.dg/cpp0x/constexpr-__func__.C
+
2014-11-19 Renlin Li <Renlin.Li@arm.com>
- PR target/63424
+
+ PR target/63424
* gcc.target/aarch64/pr63424.c: New test.
2014-11-19 Renlin Li <Renlin.Li@arm.com>
- PR middle-end/63762
- * gcc.dg/pr63762.c: New test.
+ PR middle-end/63762
+ * gcc.dg/pr63762.c: New test.
2014-11-19 Marek Polacek <polacek@redhat.com>
--- /dev/null
+// PR c++/55425
+// { dg-do compile { target c++11 } }
+
+constexpr const char* x() { return __func__; }
+constexpr const char* y() { return __FUNCTION__; }
+constexpr const char* z() { return __PRETTY_FUNCTION__; }