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
This commit is contained in:
Kriang Lerdsuwanakij 2003-11-01 12:00:25 +00:00 committed by Kriang Lerdsuwanakij
parent 97603db35a
commit 441b941ac2
2 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2003-11-01 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/12796
* class.c (handle_using_decl): Set input_location before calling
error_not_base_type.
2003-10-26 Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net>
PR c++/10371

View File

@ -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;
}