This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Bug 53289 - unnecessary repetition of caret diagnostics


Simple enough. Bootstrapped and regression tested.

The output for the example in the PR is now:

/home/manuel/caret-overload.C:6:6: error: no matching function for
call to ‘g(int)’
   g(1);
      ^
/home/manuel/caret-overload.C:6:6: note: candidate is:
/home/manuel/caret-overload.C:2:18: note: template<class T> typename
T::type g(T)
 typename T::type g(T);
                  ^
/home/manuel/caret-overload.C:2:18: note:   template argument
deduction/substitution failed:
/home/manuel/caret-overload.C: In substitution of ‘template<class T>
typename T::type g(T) [with T = int]’:
/home/manuel/caret-overload.C:6:6:   required from here
/home/manuel/caret-overload.C:2:18: error: ‘int’ is not a class,
struct, or union type

OK?

2012-05-09  Manuel López-Ibáñez  <manu@gcc.gnu.org>

	PR c++/53289
gcc/
	* diagnostic.h (diagnostic_context): Add last_location.
	* diagnostic.c (diagnostic_initialize): Initialize it.
	(diagnostic_show_locus): Use it.

Attachment: caret-rep.diff
Description: Binary data


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]