summaryrefslogtreecommitdiff
path: root/gcc/cp/class.c
diff options
context:
space:
mode:
authorlerdsuwa <lerdsuwa@138bc75d-0d04-0410-961f-82ee72b054a4>2003-11-01 12:00:25 +0000
committerlerdsuwa <lerdsuwa@138bc75d-0d04-0410-961f-82ee72b054a4>2003-11-01 12:00:25 +0000
commit1ba87425f2ad44a71a4220adf20a8060a2bb23f2 (patch)
tree47697c80f8095a55d26add5bc3d5887998f32126 /gcc/cp/class.c
parent39b952d423a0445c5a57f414738bda054a425af0 (diff)
downloadgcc-1ba87425f2ad44a71a4220adf20a8060a2bb23f2.tar.gz
PR c++/12796
* class.c (handle_using_decl): Set input_location before calling error_not_base_type. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@73174 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r--gcc/cp/class.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c
index a053956ad9a..300d8466a01 100644
--- a/gcc/cp/class.c
+++ b/gcc/cp/class.c
@@ -1109,7 +1109,11 @@ handle_using_decl (tree using_decl, tree t)
binfo = lookup_base (t, ctype, ba_any, NULL);
if (! binfo)
{
+ location_t saved_loc = input_location;
+
+ input_location = DECL_SOURCE_LOCATION (using_decl);
error_not_base_type (ctype, t);
+ input_location = saved_loc;
return;
}