aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp/cp-tree.h
diff options
context:
space:
mode:
authorJason Merrill <jason@redhat.com>2009-07-31 22:26:42 -0400
committerJason Merrill <jason@gcc.gnu.org>2009-07-31 22:26:42 -0400
commite7f1930f9411e6fcee99f832a5a16c74cd6740c6 (patch)
tree835681f433a68776c98b51aa17db749656db573d /gcc/cp/cp-tree.h
parent4c65085391c06df2a7b1acb4767e63aee6763d2c (diff)
downloadgcc-e7f1930f9411e6fcee99f832a5a16c74cd6740c6.zip
gcc-e7f1930f9411e6fcee99f832a5a16c74cd6740c6.tar.gz
gcc-e7f1930f9411e6fcee99f832a5a16c74cd6740c6.tar.bz2
call.c (convert_class_to_reference): Binding an lvalue to an rvalue reference is bad.
* call.c (convert_class_to_reference): Binding an lvalue to an rvalue reference is bad. If the user-defined conversion is bad, set bad_p before merging conversions. (maybe_handle_ref_bind): Don't push down bad_p. (reference_binding): Binding an lvalue to an rvalue reference is bad. (convert_like_real): Give a helpful error about binding lvalue to rvalue reference. (reference_related_p): No longer static. * typeck.c (build_typed_address): New. (build_static_cast_1): Add static_cast from lvalue to &&. * cp-tree.h: Adjust. * include/bits/move.h (forward): Implement as in N2835. (move): Implement as in N2831. * include/std/istream (rvalue stream operator>>): New. * include/std/ostream (rvalue stream operator<<): New. Co-Authored-By: Douglas Gregor <doug.gregor@gmail.com> From-SVN: r150327
Diffstat (limited to 'gcc/cp/cp-tree.h')
-rw-r--r--gcc/cp/cp-tree.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/gcc/cp/cp-tree.h b/gcc/cp/cp-tree.h
index 07e89d3..c507ac8 100644
--- a/gcc/cp/cp-tree.h
+++ b/gcc/cp/cp-tree.h
@@ -4266,6 +4266,7 @@ extern tree set_up_extended_ref_temp (tree, tree, tree *, tree *);
extern tree initialize_reference (tree, tree, tree, tree *);
extern tree make_temporary_var_for_ref_to_temp (tree, tree);
extern tree strip_top_quals (tree);
+extern bool reference_related_p (tree, tree);
extern tree perform_implicit_conversion (tree, tree, tsubst_flags_t);
extern tree perform_implicit_conversion_flags (tree, tree, tsubst_flags_t, int);
extern tree perform_direct_initialization_if_possible (tree, tree, bool,
@@ -5062,6 +5063,7 @@ extern tree cp_build_binary_op (location_t,
#define cxx_sizeof(T) cxx_sizeof_or_alignof_type (T, SIZEOF_EXPR, true)
extern tree build_ptrmemfunc_access_expr (tree, tree);
extern tree build_address (tree);
+extern tree build_typed_address (tree, tree);
extern tree build_nop (tree, tree);
extern tree non_reference (tree);
extern tree lookup_anon_field (tree, tree);