+2009-01-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/38795
+ * tree.c (cp_walk_subtrees): Handle REINTERPRET_CAST_EXPR,
+ STATIC_CAST_EXPR, CONST_CAST_EXPR and DYNAMIC_CAST_EXPR the same
+ as CAST_EXPR.
+
2009-01-12 Jason Merrill <jason@redhat.com>
Steve Ellcey <sje@cup.hp.com>
/* Language-dependent node constructors for parse phase of GNU compiler.
Copyright (C) 1987, 1988, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
Free Software Foundation, Inc.
Hacked by Michael Tiemann (tiemann@cygnus.com)
break;
case CAST_EXPR:
+ case REINTERPRET_CAST_EXPR:
+ case STATIC_CAST_EXPR:
+ case CONST_CAST_EXPR:
+ case DYNAMIC_CAST_EXPR:
if (TREE_TYPE (*tp))
WALK_SUBTREE (TREE_TYPE (*tp));
+2009-01-13 Jakub Jelinek <jakub@redhat.com>
+
+ PR c++/38795
+ * g++.dg/cpp0x/pr38795.C: New test.
+
2009-01-13 Daniel Jacobowitz <dan@codesourcery.com>
Nathan Froyd <froydnj@codesourcery.com>
Joseph Myers <joseph@codesourcery.com>
--- /dev/null
+// PR c++/38795
+// { dg-do compile }
+// { dg-options "-std=gnu++0x" }
+
+template<typename... T> int foo(int i)
+{
+ return *reinterpret_cast<T*>(i); // { dg-error "not expanded with|T" }
+}
+
+void bar(int i)
+{
+ foo<int>(i);
+}