This is the mail archive of the gcc-bugs@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 c++/53289] New: unnecessary repetition of caret diagnostics


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53289

             Bug #: 53289
           Summary: unnecessary repetition of caret diagnostics
    Classification: Unclassified
           Product: gcc
           Version: 4.8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: zeratul976@hotmail.com


Consider the following (invalid) code:


template <typename T>
typename T::type g(T);

int main()
{
    g(1);
}


The error messages are as follows:


test.cpp: In function 'int main()':
test.cpp:6:8: error: no matching function for call to 'g(int)'
     g(1);
        ^
test.cpp:6:8: note: candidate is:
     g(1);
        ^
test.cpp:2:18: note: template<class T> typename T::type g(T)
 typename T::type g(T);
                  ^
test.cpp:2:18: note:   template argument deduction/substitution failed:
 typename T::type g(T);
                  ^
test.cpp: In substitution of 'template<class T> typename T::type g(T) [with T =
int]':
test.cpp:6:8:   required from here
test.cpp:2:18: error: 'int' is not a class, struct, or union type
 typename T::type g(T);
                  ^


The line with the call to g is shown twice; the line with the declaration of g
is shown three times. These repetitions are unnecessary and waste valuable
screen space.


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