aboutsummaryrefslogtreecommitdiff
path: root/gcc/cp
diff options
context:
space:
mode:
authorNicola Pero <nicola.pero@meta-innovation.com>2010-11-30 21:55:39 +0000
committerNicola Pero <nicola@gcc.gnu.org>2010-11-30 21:55:39 +0000
commit6c39e757f6ef3dd6c470cd0293dacd8e94e0fe47 (patch)
tree8172aebfe61894b96734ffe92ed52f31bce5003d /gcc/cp
parent1ab3acf4666620a8f37107698cd01a2a4a716552 (diff)
downloadgcc-6c39e757f6ef3dd6c470cd0293dacd8e94e0fe47.zip
gcc-6c39e757f6ef3dd6c470cd0293dacd8e94e0fe47.tar.gz
gcc-6c39e757f6ef3dd6c470cd0293dacd8e94e0fe47.tar.bz2
In gcc/c-family/: 2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
In gcc/c-family/: 2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com> * c-common.h (objc_finish_function): New. (objc_non_volatilized_type): Removed. (objc_type_quals_match): Removed. * stub-objc.c (objc_finish_function): New. (objc_non_volatilized_type): Removed. (objc_type_quals_match): Removed. In gcc/objc/: 2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com> * objc-act.c (objc_build_volatilized_type): Removed. (objc_non_volatilized_type): Removed. (objc_type_quals_match): Removed. (local_variables_to_volatilize): New. (objc_volatilize_decl): Add the decl to volatilize to local_variables_to_volatilize, but don't volatilize it yet. (objc_finish_function): New. * objc-act.h (local_variables_to_volatilize): New. In gcc/cp/: 2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com> * decl.c (finish_function): Call objc_finish_function when compiling Objective-C++. * call.c (standard_conversion): Do not call objc_non_volatilized_type(). (implicit_conversion): Same change. * typeck.c (comp_ptr_ttypes_real): Same change. In gcc/: 2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com> * c-decl.c (finish_function): Call objc_finish_function in Objective-C. * c-typeck.c (convert_for_assignment): Do not call objc_type_quals_match(). From-SVN: r167318
Diffstat (limited to 'gcc/cp')
-rw-r--r--gcc/cp/ChangeLog9
-rw-r--r--gcc/cp/call.c5
-rw-r--r--gcc/cp/decl.c3
-rw-r--r--gcc/cp/typeck.c12
4 files changed, 15 insertions, 14 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 7c0d7bf..706c974 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,12 @@
+2010-11-30 Nicola Pero <nicola.pero@meta-innovation.com>
+
+ * decl.c (finish_function): Call objc_finish_function when
+ compiling Objective-C++.
+ * call.c (standard_conversion): Do not call
+ objc_non_volatilized_type().
+ (implicit_conversion): Same change.
+ * typeck.c (comp_ptr_ttypes_real): Same change.
+
2010-11-30 Joseph Myers <joseph@codesourcery.com>
* cp-gimplify.c, cp-lang.c, cvt.c, cxx-pretty-print.c, error.c,
diff --git a/gcc/cp/call.c b/gcc/cp/call.c
index 0f016ca..6a11217 100644
--- a/gcc/cp/call.c
+++ b/gcc/cp/call.c
@@ -872,8 +872,6 @@ standard_conversion (tree to, tree from, tree expr, bool c_cast_p,
&& TREE_CODE (TREE_TYPE (from)) != FUNCTION_TYPE)
{
tree nfrom = TREE_TYPE (from);
- if (c_dialect_objc ())
- nfrom = objc_non_volatilized_type (nfrom);
from = build_pointer_type
(cp_build_qualified_type (void_type_node,
cp_type_quals (nfrom)));
@@ -1483,9 +1481,6 @@ implicit_conversion (tree to, tree from, tree expr, bool c_cast_p,
|| expr == error_mark_node)
return NULL;
- if (c_dialect_objc ())
- from = objc_non_volatilized_type (from);
-
if (TREE_CODE (to) == REFERENCE_TYPE)
conv = reference_binding (to, from, expr, c_cast_p, flags);
else
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index c494e1c..f772d60 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -12811,6 +12811,9 @@ finish_function (int flags)
if (fndecl == NULL_TREE)
return error_mark_node;
+ if (c_dialect_objc ())
+ objc_finish_function ();
+
gcc_assert (!defer_mark_used_calls);
defer_mark_used_calls = true;
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index df31d87..80aa725 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -7869,16 +7869,10 @@ comp_ptr_ttypes_real (tree to, tree from, int constp)
so the usual checks are not appropriate. */
if (TREE_CODE (to) != FUNCTION_TYPE && TREE_CODE (to) != METHOD_TYPE)
{
- /* In Objective-C++, some types may have been 'volatilized' by
- the compiler for EH; when comparing them here, the volatile
- qualification must be ignored. */
- tree nv_to = objc_non_volatilized_type (to);
- tree nv_from = objc_non_volatilized_type (from);
-
- if (!at_least_as_qualified_p (nv_to, nv_from))
+ if (!at_least_as_qualified_p (to, from))
return 0;
- if (!at_least_as_qualified_p (nv_from, nv_to))
+ if (!at_least_as_qualified_p (from, to))
{
if (constp == 0)
return 0;
@@ -7886,7 +7880,7 @@ comp_ptr_ttypes_real (tree to, tree from, int constp)
}
if (constp > 0)
- constp &= TYPE_READONLY (nv_to);
+ constp &= TYPE_READONLY (to);
}
if (TREE_CODE (to) == VECTOR_TYPE)