summaryrefslogtreecommitdiff
path: root/gcc/objcp
diff options
context:
space:
mode:
authormmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2006-08-20 23:53:10 +0000
committermmitchel <mmitchel@138bc75d-0d04-0410-961f-82ee72b054a4>2006-08-20 23:53:10 +0000
commitbde9ebf7cf3d5d60b007f9fd1bce8b04eb32dd68 (patch)
tree4756c8f497c36fa34840353e1ec97dc8da3e2992 /gcc/objcp
parent6f30959add9e80d2b49995b248bf7f0357b8c7d4 (diff)
downloadgcc-bde9ebf7cf3d5d60b007f9fd1bce8b04eb32dd68.tar.gz
PR c++/28341
* tree.c (cast_valid_in_integral_constant_expression_p): New function. * cp-tree.h (tsubst_copy_and_build): Adjust prototype. * pt.c (tsubst_expr): Add integral_constant_expression_p parameter. (fold_non_dependent_expr): Adjust callers of tsubst_{expr,copy_and_build}. (tsubst_friend_function): Likewise. (tsubst_template_arg): Likewise. (tsubst_default_argument): Likewise. (tsubst_decl): Likewise. (tsubst): Likewise. (tsubst_omp_clasuses): Likewise. (regenerate_decl_fromp_template): Likewise. (instantiate_decl): Likewise. (tsubst_initializer_list): Likewise. (tsubst_enum): Likewise. (tsubst_expr): Use RECUR throughout. (tsubst_copy_and_build): Change definition of RECUR. Do not allow invalid casts in integral constant expressions. * parser.c (cp_parser_postfix_expression): Use cast_valid_in_integral_constant_expression_p. (cp_parser_cast_expression): Likewise. (cp_parser_functional_cast): Likewise. PR c++/28346 * pt.c (tsubst_qualified_id): Do not strip references from OFFSET_REFs. 2006-08-20 Mark Mitchell <mark@codesourcery.com> PR c++/28341 * g++.dg/template/ref3.C: New test. * g++.dg/template/nontype13.C: New test. PR c++/28346 * g++.dg/template/ptrmem17.C: New test. 2006-08-20 Mark Mitchell <mark@codesourcery.com> * objcp-lang.c (objcp_tsubst_copy_and_build): Adjust call to tsubst_copy_and_build. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@116276 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/objcp')
-rw-r--r--gcc/objcp/ChangeLog5
-rw-r--r--gcc/objcp/objcp-lang.c6
2 files changed, 9 insertions, 2 deletions
diff --git a/gcc/objcp/ChangeLog b/gcc/objcp/ChangeLog
index c16147658f3..38b9ffe63a4 100644
--- a/gcc/objcp/ChangeLog
+++ b/gcc/objcp/ChangeLog
@@ -1,3 +1,8 @@
+2006-08-20 Mark Mitchell <mark@codesourcery.com>
+
+ * objcp-lang.c (objcp_tsubst_copy_and_build): Adjust call to
+ tsubst_copy_and_build.
+
2006-07-28 Volker Reichelt <reichelt@igpm.rwth-aachen.de>
* Make-lang.in: Use $(HEADER_H) instead of header.h in dependencies.
diff --git a/gcc/objcp/objcp-lang.c b/gcc/objcp/objcp-lang.c
index 35081852be9..19a865475a6 100644
--- a/gcc/objcp/objcp-lang.c
+++ b/gcc/objcp/objcp-lang.c
@@ -110,8 +110,10 @@ tree
objcp_tsubst_copy_and_build (tree t, tree args, tsubst_flags_t complain,
tree in_decl, bool function_p ATTRIBUTE_UNUSED)
{
-#define RECURSE(NODE) \
- tsubst_copy_and_build (NODE, args, complain, in_decl, /*function_p=*/false)
+#define RECURSE(NODE) \
+ tsubst_copy_and_build (NODE, args, complain, in_decl, \
+ /*function_p=*/false, \
+ /*integral_constant_expression_p=*/false)
/* The following two can only occur in Objective-C++. */