diff options
author | Kriang Lerdsuwanakij <lerdsuwa@users.sourceforge.net> | 2003-11-01 12:00:25 +0000 |
---|---|---|
committer | Kriang Lerdsuwanakij <lerdsuwa@gcc.gnu.org> | 2003-11-01 12:00:25 +0000 |
commit | 441b941ac203ece3ca1c794622f1c4dba0c020a3 (patch) | |
tree | 47697c80f8095a55d26add5bc3d5887998f32126 /gcc/cp/class.c | |
parent | 97603db35a0cfab21c5f47de4671514ef2e5e1f8 (diff) | |
download | gcc-441b941ac203ece3ca1c794622f1c4dba0c020a3.zip gcc-441b941ac203ece3ca1c794622f1c4dba0c020a3.tar.gz gcc-441b941ac203ece3ca1c794622f1c4dba0c020a3.tar.bz2 |
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
Diffstat (limited to 'gcc/cp/class.c')
-rw-r--r-- | gcc/cp/class.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/cp/class.c b/gcc/cp/class.c index a053956..300d846 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; } |