From: Jason Merrill Date: Mon, 9 Aug 1999 00:28:35 +0000 (+0000) Subject: typeck.c (common_type): Use same_type_p. X-Git-Tag: releases/gcc-2.95.1~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=982ede750d2d6a0d5c102dd015303fb7488a7b21;p=thirdparty%2Fgcc.git typeck.c (common_type): Use same_type_p. * 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. From-SVN: r28607 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index bfebb6e241b9..7f45b354dbe7 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,7 +1,8 @@ -1999-08-06 Jason Merrill +1999-08-08 Jason Merrill + + * 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 * 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 ea472082e19f..c60acc7b80d0 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 d0743e950f40..f1c8a1ff5a88 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) {