* typeck.c (build_component_ref): Use of a type here is an error.
authorJason Merrill <jason@yorick.cygnus.com>
Wed, 21 Oct 1998 03:52:48 +0000 (03:52 +0000)
committerJason Merrill <jason@gcc.gnu.org>
Wed, 21 Oct 1998 03:52:48 +0000 (23:52 -0400)
From-SVN: r23207

gcc/cp/ChangeLog
gcc/cp/typeck.c

index fb5a81e66e42805f2bdb1c9a685ed68074fa75e5..8bdc1629445768aaa9e3371d7b1c9ea6ca896a47 100644 (file)
@@ -1,3 +1,7 @@
+1998-10-21  Jason Merrill  <jason@yorick.cygnus.com>
+
+       * typeck.c (build_component_ref): Use of a type here is an error.
+
 1998-10-19  Jason Merrill  <jason@yorick.cygnus.com>
 
        Revamp references to member functions.
index 5cd21f1509028b33628d66d352ce232d34ae1dc5..7a74819038982702610498f403cad28777c3d603 100644 (file)
@@ -2053,8 +2053,8 @@ build_component_ref (datum, component, basetype_path, protect)
     field = component;
   else if (TREE_CODE (component) == TYPE_DECL)
     {
-      cp_pedwarn ("invalid use of type decl `%#D' as expression", component);
-      return component;
+      cp_error ("invalid use of type decl `%#D' as expression", component);
+      return error_mark_node;
     }
   else
     {