aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>1999-08-09 00:28:35 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>1999-08-09 00:28:35 +0000
commitebb2e8f64fa570f58e2a3d2a673bb029b67260f5 (patch)
treed8a4cbde761050f2ba02fdfc9cda3151c33d76fd
parentfefa9f5930d6ec9cfd3a7bd69d60d3e19675db70 (diff)
* typeck.c (common_type): Use same_type_p.
and revert: * decl.c (bad_specifiers): It's OK to have an EH spec on a function pointer. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-2_95-branch@28607 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/cp/ChangeLog11
-rw-r--r--gcc/cp/decl.c6
-rw-r--r--gcc/cp/typeck.c2
3 files changed, 8 insertions, 11 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index bfebb6e241b..7f45b354dbe 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,7 +1,8 @@
-1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
+1999-08-08 Jason Merrill <jason@yorick.cygnus.com>
+
+ * typeck.c (common_type): Use same_type_p.
- * decl.c (bad_specifiers): It's OK to have an EH spec on a function
- pointer.
+1999-08-06 Jason Merrill <jason@yorick.cygnus.com>
* pt.c (maybe_get_template_decl_from_type_decl): Make sure that
we're looking at a class.
@@ -59,10 +60,6 @@ Wed Jul 28 21:39:31 PDT 1999 Jeff Law (law@cygnus.com)
* gcc-2.95 Released.
-Sun Jul 25 23:40:51 PDT 1999 Jeff Law (law@cygnus.com)
-
- * gcc-2.95 Released.
-
Sun Jul 25 15:24:21 1999 Jeffrey A Law (law@cygnus.com)
* g++FAQ.texi: Deleted per Joe Buck's request.
diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c
index ea472082e19..c60acc7b80d 100644
--- a/gcc/cp/decl.c
+++ b/gcc/cp/decl.c
@@ -8709,9 +8709,9 @@ bad_specifiers (object, type, virtualp, quals, inlinep, friendp, raises)
cp_error ("`const' and `volatile' function specifiers on `%D' invalid in %s declaration",
object, type);
if (friendp)
- cp_error_at ("`%D' declared as a friend", object);
- if (raises && ! TYPE_PTRFN_P (TREE_TYPE (object)))
- cp_error_at ("`%D' declared with an exception specification", object);
+ cp_error_at ("invalid friend declaration", object);
+ if (raises)
+ cp_error_at ("invalid exception specifications", object);
}
/* CTYPE is class type, or null if non-class.
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index d0743e950f4..f1c8a1ff5a8 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -582,7 +582,7 @@ common_type (t1, t2)
tt1 = TYPE_MAIN_VARIANT (tt1);
tt2 = TYPE_MAIN_VARIANT (tt2);
- if (tt1 == tt2)
+ if (same_type_p (tt1, tt2))
target = tt1;
else if (b1)
{