From: Kriang Lerdsuwanakij Date: Sat, 1 Nov 2003 12:00:25 +0000 (+0000) Subject: re PR c++/12796 (Wrong line number in error message) X-Git-Tag: releases/gcc-3.4.0~2557 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=441b941ac203ece3ca1c794622f1c4dba0c020a3;p=thirdparty%2Fgcc.git re PR c++/12796 (Wrong line number in error message) PR c++/12796 * class.c (handle_using_decl): Set input_location before calling error_not_base_type. From-SVN: r73174 --- diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog index 0b7e80975b98..db68053d80fe 100644 --- a/gcc/cp/ChangeLog +++ b/gcc/cp/ChangeLog @@ -1,3 +1,9 @@ +2003-11-01 Kriang Lerdsuwanakij + + PR c++/12796 + * class.c (handle_using_decl): Set input_location before calling + error_not_base_type. + 2003-10-26 Kriang Lerdsuwanakij PR c++/10371 diff --git a/gcc/cp/class.c b/gcc/cp/class.c index a053956ad9ae..300d8466a01f 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; }