aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJason Merrill <jason@yorick.cygnus.com>1998-10-21 03:52:48 +0000
committerJason Merrill <jason@gcc.gnu.org>1998-10-20 23:52:48 -0400
commitcd916110da125725949ef751f24c97fbe0d82345 (patch)
tree852c68ad7fa9137e740844d0e3d3841f1d7f62d1 /gcc
parent352f608aaabfcc1d238731b9dcc52b9c09ab9c9b (diff)
downloadgcc-cd916110da125725949ef751f24c97fbe0d82345.zip
gcc-cd916110da125725949ef751f24c97fbe0d82345.tar.gz
gcc-cd916110da125725949ef751f24c97fbe0d82345.tar.bz2
* typeck.c (build_component_ref): Use of a type here is an error.
From-SVN: r23207
Diffstat (limited to 'gcc')
-rw-r--r--gcc/cp/ChangeLog4
-rw-r--r--gcc/cp/typeck.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index fb5a81e..8bdc162 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -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.
diff --git a/gcc/cp/typeck.c b/gcc/cp/typeck.c
index 5cd21f1..7a74819 100644
--- a/gcc/cp/typeck.c
+++ b/gcc/cp/typeck.c
@@ -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
{