OSDN Git Service

* decl.c (check_tag_decl): Diagnose typename's which don't
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 11 Aug 2000 09:12:31 +0000 (09:12 +0000)
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 11 Aug 2000 09:12:31 +0000 (09:12 +0000)
declare anything.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@35627 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/cp/ChangeLog
gcc/cp/decl.c

index dc4e4c9..ab9264e 100644 (file)
@@ -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
index 0656f06..d3a0e52 100644 (file)
@@ -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;