public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/23965] New: [3.4/4.0/4.1 regression] Bogus error message: no matching function for call to 'foo(<type error>)'
@ 2005-09-19 14:04 reichelt at gcc dot gnu dot org
  2005-09-19 14:19 ` [Bug c++/23965] " reichelt at gcc dot gnu dot org
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-09-19 14:04 UTC (permalink / raw)
  To: gcc-bugs

For the testcase

  template<typename T> void foo(T);

  void bar()
  {
    struct A a;
    foo(a);
  }

the we get the following error message since GCC 3.4.0:

  bug.cc: In function 'void bar()':
  bug.cc:5: error: aggregate 'A a' has incomplete type and cannot be defined
  bug.cc:6: error: no matching function for call to 'foo(<type error>)'

Although not completely bogus, the last line is not very helpful here.
Since "a" has error_mark_node as type, overload resolution just won't
work. In fact we shouldn't perform overload analysis here at all IMHO.

Patch under way.

-- 
           Summary: [3.4/4.0/4.1 regression] Bogus error message: no
                    matching function for call to 'foo(<type error>)'
           Product: gcc
           Version: 4.1.0
            Status: UNCONFIRMED
          Keywords: diagnostic
          Severity: normal
          Priority: P2
         Component: c++
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: reichelt at gcc dot gnu dot org
                CC: gcc-bugs at gcc dot gnu dot org


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


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

end of thread, other threads:[~2005-09-27 16:01 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-09-19 14:04 [Bug c++/23965] New: [3.4/4.0/4.1 regression] Bogus error message: no matching function for call to 'foo(<type error>)' reichelt at gcc dot gnu dot org
2005-09-19 14:19 ` [Bug c++/23965] " reichelt at gcc dot gnu dot org
2005-09-21 15:34 ` cvs-commit at gcc dot gnu dot org
2005-09-21 15:41 ` cvs-commit at gcc dot gnu dot org
2005-09-21 15:43 ` [Bug c++/23965] [4.0 " reichelt at gcc dot gnu dot org
2005-09-27 16:01 ` mmitchel at gcc dot gnu 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).