* constexpr.c (cxx_eval_constant_expression): Handle USING_STMT.
From-SVN: r257762
2018-02-16 Jason Merrill <jason@redhat.com>
+ PR c++/81853 - using-directive and constexpr.
+ * constexpr.c (cxx_eval_constant_expression): Handle USING_STMT.
+
PR c++/84420 - ICE with structured binding in lambda.
* lambda.c (is_capture_proxy): Check DECL_DECOMPOSITION_P.
jump_target);
break;
+ case USING_STMT:
+ r = void_node;
+ break;
+
default:
if (STATEMENT_CODE_P (TREE_CODE (t)))
{
--- /dev/null
+// PR c++/81853
+// { dg-do compile { target c++11 } }
+// { dg-options "" }
+
+namespace N {
+ enum { i };
+}
+
+int g ()
+{
+ constexpr int j = ({ using namespace N; i; });
+ return j;
+}