diff options
author | Nathan Sidwell <nathan@codesourcery.com> | 2000-08-11 09:12:31 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2000-08-11 09:12:31 +0000 |
commit | 73ae5c34ab14680fed7a8ae34f769a0e0b7df4f1 (patch) | |
tree | 8789b24f700d82b72c4f2bed91348640a08fdbe7 | |
parent | 9eba0801b6256850a254f51713ee780037ef9b0d (diff) | |
download | gcc-73ae5c34ab14680fed7a8ae34f769a0e0b7df4f1.zip gcc-73ae5c34ab14680fed7a8ae34f769a0e0b7df4f1.tar.gz gcc-73ae5c34ab14680fed7a8ae34f769a0e0b7df4f1.tar.bz2 |
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
-rw-r--r-- | gcc/cp/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/cp/decl.c | 3 |
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index dc4e4c9..ab9264e 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,8 @@ +2000-08-11 Nathan Sidwell <nathan@codesourcery.com> + + * decl.c (check_tag_decl): Diagnose typename's which don't + declare anything. + 2000-08-10 Nathan Sidwell <nathan@codesourcery.com> * init.c (build_aggr_init): Reject bogus array initializers diff --git a/gcc/cp/decl.c b/gcc/cp/decl.c index 0656f06..d3a0e52 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; |