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; 7+ 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] 7+ messages in thread

* [Bug c++/23965] [3.4/4.0/4.1 regression] Bogus error message: no matching function for call to 'foo(<type error>)'
  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 ` reichelt at gcc dot gnu dot org
  2005-09-21 15:34 ` cvs-commit at gcc dot gnu dot org
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-09-19 14:19 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
         AssignedTo|unassigned at gcc dot gnu   |reichelt at gcc dot gnu dot
                   |dot org                     |org
                URL|                            |http://gcc.gnu.org/ml/gcc-
                   |                            |patches/2005-
                   |                            |09/msg01154.html
           Severity|normal                      |minor
             Status|UNCONFIRMED                 |ASSIGNED
           Keywords|                            |patch
   Target Milestone|---                         |4.0.2


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


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

* [Bug c++/23965] [3.4/4.0/4.1 regression] Bogus error message: no matching function for call to 'foo(<type error>)'
  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
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-09-21 15:34 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-09-21 15:34 -------
Subject: Bug 23965

CVSROOT:	/cvs/gcc
Module name:	gcc
Changes by:	reichelt@gcc.gnu.org	2005-09-21 15:34:42

Modified files:
	gcc/cp         : ChangeLog call.c 
	gcc/testsuite  : ChangeLog 
	gcc/testsuite/g++.dg/template: error1.C 

Log message:
	PR c++/23965
	* call.c (resolve_args): Return error_mark_node on arguments
	whose TREE_TYPE is error_mark_node.
	
	* g++.dg/template/error1.C: Reject "no matching function" message.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4898&r2=1.4899
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/call.c.diff?cvsroot=gcc&r1=1.552&r2=1.553
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.6091&r2=1.6092
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/error1.C.diff?cvsroot=gcc&r1=1.1&r2=1.2



-- 


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


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

* [Bug c++/23965] [3.4/4.0/4.1 regression] Bogus error message: no matching function for call to 'foo(<type error>)'
  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
  4 siblings, 0 replies; 7+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-09-21 15:41 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From cvs-commit at gcc dot gnu dot org  2005-09-21 15:40 -------
Subject: Bug 23965

CVSROOT:	/cvs/gcc
Module name:	gcc
Branch: 	gcc-3_4-branch
Changes by:	reichelt@gcc.gnu.org	2005-09-21 15:39:53

Modified files:
	gcc/cp         : ChangeLog call.c 
	gcc/testsuite  : ChangeLog 
	gcc/testsuite/g++.dg/template: error1.C 

Log message:
	PR c++/23965
	* call.c (resolve_args): Return error_mark_node on arguments
	whose TREE_TYPE is error_mark_node.
	
	* g++.dg/template/error1.C: Reject "no matching function" message.

Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3892.2.243&r2=1.3892.2.244
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/call.c.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.452.2.28&r2=1.452.2.29
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.3389.2.437&r2=1.3389.2.438
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/template/error1.C.diff?cvsroot=gcc&only_with_tag=gcc-3_4-branch&r1=1.1&r2=1.1.22.1



-- 


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


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

* [Bug c++/23965] [4.0 regression] Bogus error message: no matching function for call to 'foo(<type error>)'
  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
                   ` (2 preceding siblings ...)
  2005-09-21 15:41 ` cvs-commit at gcc dot gnu dot org
@ 2005-09-21 15:43 ` reichelt at gcc dot gnu dot org
  2005-09-27 16:01 ` mmitchel at gcc dot gnu dot org
  4 siblings, 0 replies; 7+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-09-21 15:43 UTC (permalink / raw)
  To: gcc-bugs


------- Additional Comments From reichelt at gcc dot gnu dot org  2005-09-21 15:41 -------
Fixed on mainline and the 3.4 branch.
Waiting for 4.0 branch to unfreeze.


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
            Summary|[3.4/4.0/4.1 regression]    |[4.0 regression] Bogus error
                   |Bogus error message: no     |message: no matching
                   |matching function for call  |function for call to
                   |to 'foo(<type error>)'      |'foo(<type error>)'


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


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

* [Bug c++/23965] [4.0 regression] Bogus error message: no matching function for call to 'foo(<type error>)'
  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
                   ` (3 preceding siblings ...)
  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
  4 siblings, 0 replies; 7+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-09-27 16:01 UTC (permalink / raw)
  To: gcc-bugs



-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   Target Milestone|4.0.2                       |4.0.3


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


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

* [Bug c++/23965] [3.4/4.0/4.1 regression] Bogus error message: no matching function for call to 'foo(<type error>)'
       [not found] <bug-23965-1771@http.gcc.gnu.org/bugzilla/>
@ 2005-10-06 14:11 ` reichelt at gcc dot gnu dot org
  0 siblings, 0 replies; 7+ messages in thread
From: reichelt at gcc dot gnu dot org @ 2005-10-06 14:11 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #6 from reichelt at gcc dot gnu dot org  2005-10-06 14:11 -------
The redundant check is now also fixed:
http://gcc.gnu.org/ml/gcc-cvs/2005-10/msg00190.html
http://gcc.gnu.org/ml/gcc-cvs/2005-10/msg00191.html


-- 

reichelt at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|ASSIGNED                    |RESOLVED
         Resolution|                            |FIXED
            Summary|[4.0 regression] Bogus error|[3.4/4.0/4.1 regression]
                   |message: no matching        |Bogus error message: no
                   |function for call to        |matching function for call
                   |'foo(<type error>)'         |to 'foo(<type error>)'
   Target Milestone|4.0.3                       |3.4.5


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


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

end of thread, other threads:[~2005-10-06 14:11 UTC | newest]

Thread overview: 7+ 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
     [not found] <bug-23965-1771@http.gcc.gnu.org/bugzilla/>
2005-10-06 14:11 ` [Bug c++/23965] [3.4/4.0/4.1 " reichelt 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).