public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
[parent not found: <bug-19741-4@http.gcc.gnu.org/bugzilla/>]
* [Bug c++/19741] New: less than optimal error message (actually, just appears wrong, use of <unknown_type>?)
@ 2005-02-01 14:06 eda-qa at disemia dot com
  2005-02-01 14:27 ` [Bug c++/19741] suboptimal error message for template functions (as opposed to non-templates) bangerth at dealii dot org
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: eda-qa at disemia dot com @ 2005-02-01 14:06 UTC (permalink / raw)
  To: gcc-bugs

(Such an error also appears to exist in 5458)

In the attached example the following error appears:
tpladdr.cc: In function `int main()':
tpladdr.cc:21: error: no matching function for call to `Op<int>::Exec(int,
<unknown type>)'
tpladdr.cc:14: error: candidates are: static bool Op<T>::Exec(T, bool (*)(T))
[with T = int]

In this case the error does not help (actually it misleads) as to what the
problem is.  The reference to <unknown_type> seems to indicate that it doesn't
know the type of that paremeter, when in indeed it actually does, but the
function type has the wrong signature...

Simply correcting the function signature to:
bool Func( T param )

Allows the program to work as it should.

Thus the error message is simply very confusing.

-- 
           Summary: less than optimal error message (actually, just appears
                    wrong, use of <unknown_type>?)
           Product: gcc
           Version: 3.3.1
            Status: UNCONFIRMED
          Severity: minor
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: eda-qa at disemia dot com
                CC: gcc-bugs at gcc dot gnu dot org


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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-01-20  2:56 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <bug-19741-3255@http.gcc.gnu.org/bugzilla/>
2005-10-04  2:32 ` [Bug c++/19741] suboptimal error message for template functions (as opposed to non-templates) pinskia at gcc dot gnu dot org
     [not found] <bug-19741-4@http.gcc.gnu.org/bugzilla/>
2012-01-20  3:16 ` pinskia at gcc dot gnu.org
2005-02-01 14:06 [Bug c++/19741] New: less than optimal error message (actually, just appears wrong, use of <unknown_type>?) eda-qa at disemia dot com
2005-02-01 14:27 ` [Bug c++/19741] suboptimal error message for template functions (as opposed to non-templates) bangerth at dealii dot org
2005-02-01 16:05 ` gdr at integrable-solutions dot net
2005-02-01 17:30 ` bangerth at dealii dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).