From 73ae5c34ab14680fed7a8ae34f769a0e0b7df4f1 Mon Sep 17 00:00:00 2001 From: Nathan Sidwell Date: Fri, 11 Aug 2000 09:12:31 +0000 Subject: [PATCH] decl.c (check_tag_decl): Diagnose typename's which don't declare anything. * decl.c (check_tag_decl): Diagnose typename's which don't declare anything. From-SVN: r35627 --- gcc/cp/ChangeLog | 5 +++++ gcc/cp/decl.c | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index dc4e4c94cfd..ab9264e899a 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2000-08-11 Nathan Sidwell + + * decl.c (check_tag_decl): Diagnose typename's which don't + declare anything. + 2000-08-10 Nathan Sidwell * init.c (build_aggr_init): Reject bogus array initializers diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 0656f068918..d3a0e52bd12 100644 --- a/gcc/cp/decl.c +++ b/gcc/cp/decl.c @@ -6968,7 +6968,8 @@ check_tag_decl (declspecs) { ++found_type; - if (IS_AGGR_TYPE (value) || TREE_CODE (value) == ENUMERAL_TYPE) + if ((TREE_CODE (value) != TYPENAME_TYPE && IS_AGGR_TYPE (value)) + || TREE_CODE (value) == ENUMERAL_TYPE) { my_friendly_assert (TYPE_MAIN_DECL (value) != NULL_TREE, 261); t = value; -- 2.30.2