diff options
author | Paolo Carlini <paolo.carlini@oracle.com> | 2011-04-28 09:54:04 +0000 |
---|---|---|
committer | Paolo Carlini <paolo@gcc.gnu.org> | 2011-04-28 09:54:04 +0000 |
commit | a6343f618b2c05d0212b61b8a038f348c44f7a82 (patch) | |
tree | 6035139ba9496a71ae53b141db5c161f7e124aa1 /gcc/cp/tree.c | |
parent | 83b6b866e6860bb7555d91c1f05f9215f15a60f0 (diff) | |
download | gcc-a6343f618b2c05d0212b61b8a038f348c44f7a82.zip gcc-a6343f618b2c05d0212b61b8a038f348c44f7a82.tar.gz gcc-a6343f618b2c05d0212b61b8a038f348c44f7a82.tar.bz2 |
re PR c++/48530 ([C++0x][SFINAE] Hard errors with deleted d'tors)
/cp
2011-04-28 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/48530
* tree.c (build_cplus_new): Check build_target_expr return
value for error_mark_node.
/testsuite
2011-04-28 Paolo Carlini <paolo.carlini@oracle.com>
PR c++/48530
* g++.dg/cpp0x/sfinae18.C: New.
From-SVN: r173063
Diffstat (limited to 'gcc/cp/tree.c')
-rw-r--r-- | gcc/cp/tree.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gcc/cp/tree.c b/gcc/cp/tree.c index 2f082a6..2eaa1db 100644 --- a/gcc/cp/tree.c +++ b/gcc/cp/tree.c @@ -1,6 +1,6 @@ /* 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, 2009, 2010 + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. Hacked by Michael Tiemann (tiemann@cygnus.com) @@ -456,7 +456,9 @@ build_cplus_new (tree type, tree init, tsubst_flags_t complain) return rval; rval = build_target_expr (slot, rval, complain); - TARGET_EXPR_IMPLICIT_P (rval) = 1; + + if (rval != error_mark_node) + TARGET_EXPR_IMPLICIT_P (rval) = 1; return rval; } |