summaryrefslogtreecommitdiff
path: root/gcc/cp/expr.c
diff options
context:
space:
mode:
authormrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4>1996-03-21 19:46:11 +0000
committermrs <mrs@138bc75d-0d04-0410-961f-82ee72b054a4>1996-03-21 19:46:11 +0000
commitd2a15a126c1aadbdfef279e54b73047d26cb49f8 (patch)
tree71acc1f1dfc74c8765bd1a8cb6d4812f1fc07115 /gcc/cp/expr.c
parent33a0ea3cd02a3d94c6bd1e91808a298edbba2d90 (diff)
downloadgcc-d2a15a126c1aadbdfef279e54b73047d26cb49f8.tar.gz
85th Cygnus<->FSF quick merge
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@11587 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/expr.c')
-rw-r--r--gcc/cp/expr.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/gcc/cp/expr.c b/gcc/cp/expr.c
index fc59cb6cfa2..9986698d20f 100644
--- a/gcc/cp/expr.c
+++ b/gcc/cp/expr.c
@@ -366,6 +366,9 @@ do_case (start, end)
{
tree value1 = NULL_TREE, value2 = NULL_TREE, label;
+ if (start && POINTER_TYPE_P (TREE_TYPE (start)))
+ error ("pointers are not permitted as case values");
+
if (end && pedantic)
pedwarn ("ANSI C++ forbids range expressions in switch statement");