diff options
author | Jason Merrill <jason@yorick.cygnus.com> | 1998-11-25 11:28:29 +0000 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 1998-11-25 06:28:29 -0500 |
commit | 08b24bda510d3b1eab281447a32816d75be07756 (patch) | |
tree | 31be5c09cccdac83f00fa3eb20f0987aa64681ee /gcc | |
parent | f1db357664e1d61d7bdeed3ccc3785a3717ad33d (diff) | |
download | gcc-08b24bda510d3b1eab281447a32816d75be07756.zip gcc-08b24bda510d3b1eab281447a32816d75be07756.tar.gz gcc-08b24bda510d3b1eab281447a32816d75be07756.tar.bz2 |
except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
* except.c (expand_throw): Use TYPE_PTR_P to check for pointers.
* decl.c (check_tag_decl): Do complain about null friend decl at
file scope.
From-SVN: r23856
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/cp/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/cp/decl.c | 3 | ||||
-rw-r--r-- | gcc/cp/except.c | 2 |
3 files changed, 10 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 940d106..ea94e16 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,10 @@ +1998-11-25 Jason Merrill <jason@yorick.cygnus.com> + + * except.c (expand_throw): Use TYPE_PTR_P to check for pointers. + + * decl.c (check_tag_decl): Do complain about null friend decl at + file scope. + 1998-11-25 Andreas Schwab <schwab@issan.cs.uni-dortmund.de> * lex.c (make_lang_type): Clear the whole struct lang_type, not diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 9417363..2f48d3b 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -6483,10 +6483,11 @@ check_tag_decl (declspecs) } else if (value == ridpointers[(int) RID_FRIEND]) { - friendp = 1; if (current_class_type == NULL_TREE || current_scope () != current_class_type) ob_modifier = value; + else + friendp = 1; } else if (value == ridpointers[(int) RID_STATIC] || value == ridpointers[(int) RID_EXTERN] diff --git a/gcc/cp/except.c b/gcc/cp/except.c index 7da22cd..7198689 100644 --- a/gcc/cp/except.c +++ b/gcc/cp/except.c @@ -996,7 +996,7 @@ expand_throw (exp) pop_obstacks (); } - if (TREE_CODE (TREE_TYPE (exp)) == POINTER_TYPE) + if (TYPE_PTR_P (TREE_TYPE (exp))) throw_type = build_eh_type (exp); else { |