public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/21340] New: error in constructor lookup (can't find constructor with "const void**" argument)
@ 2005-05-02 16:31 benoit at zeroc dot com
2005-05-02 17:15 ` [Bug c++/21340] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
` (4 more replies)
0 siblings, 5 replies; 6+ messages in thread
From: benoit at zeroc dot com @ 2005-05-02 16:31 UTC (permalink / raw)
To: gcc-bugs
Ice for C++ from ZeroC (http://www.zeroc.com, source code available) doesn't compile anymore with
GCC 4.0.0 (I also tried with GCC from CVS and the result is the same). It compiled fine with GCC 3.4.2.
I'm getting an error which looks like the following with 4.0.0:
Main.cpp: In constructor 'IteratorI::IteratorI()':
Main.cpp:31: error: no matching function for call to 'Iterator::Iterator(const void**)'
Main.cpp:6: note: candidates are: Iterator::Iterator()
Main.cpp:6: note: Iterator::Iterator(const Iterator&)
I don't understand why it's looking up this constructor, the code doesn't contain any reference to it. I'm
also getting a segmentation fault of the compiler with similar code (see the code sample below). Here's
a small test case demonstrating the problem(s):
-----
class Base
{
};
class Iterator : virtual public Base
{
};
bool operator==(const Iterator&, const Iterator&);
class IteratorI : public Iterator
{
};
class Obj
{
bool operator==(const Obj&) const { return true; }
};
template <typename T>
bool dummy(const Obj& lhs, const Obj& rhs)
{
const Obj* lhsKey = &lhs;
const Obj* rhsKey = &rhs;
return *lhsKey == *rhsKey;
}
int
main(int argc, char** argv)
{
// G++ segfault with the following line uncommented
//Iterator* it1 = new Iterator();
// error: no matching function for call to 'Iterator::Iterator(const void**)'
IteratorI* it2 = new IteratorI();
}
-----
The output of 'g++ -v -save-temps Main.cpp':
-----
Using built-in specs.
Target: i686-pc-linux-gnu
Configured with: ../configure --enable-threads --prefix=/opt/gcc-4.0.0
Thread model: posix
gcc version 4.0.0
/opt/gcc-4.0.0/libexec/gcc/i686-pc-linux-gnu/4.0.0/cc1plus -E -quiet -v -D_GNU_SOURCE
Main.cpp -mtune=pentiumpro -fpch-preprocess -o Main.ii
ignoring nonexistent directory "/opt/gcc-4.0.0/lib/gcc/i686-pc-linux-gnu/4.0.0/../../../../i686-pc-
linux-gnu/include"
#include "..." search starts here:
#include <...> search starts here:
/opt/gcc-4.0.0/lib/gcc/i686-pc-linux-gnu/4.0.0/../../../../include/c++/4.0.0
/opt/gcc-4.0.0/lib/gcc/i686-pc-linux-gnu/4.0.0/../../../../include/c++/4.0.0/i686-pc-linux-gnu
/opt/gcc-4.0.0/lib/gcc/i686-pc-linux-gnu/4.0.0/../../../../include/c++/4.0.0/backward
/usr/local/include
/opt/gcc-4.0.0/include
/opt/gcc-4.0.0/lib/gcc/i686-pc-linux-gnu/4.0.0/include
/usr/include
End of search list.
/opt/gcc-4.0.0/libexec/gcc/i686-pc-linux-gnu/4.0.0/cc1plus -fpreprocessed Main.ii -quiet
-dumpbase Main.cpp -mtune=pentiumpro -auxbase Main -version -o Main.s
GNU C++ version 4.0.0 (i686-pc-linux-gnu)
compiled by GNU C version 4.0.0.
GGC heuristics: --param ggc-min-expand=64 --param ggc-min-heapsize=64389
Main.cpp: In constructor 'IteratorI::IteratorI()':
Main.cpp:31: error: no matching function for call to 'Iterator::Iterator(const void**)'
-----
--
Summary: error in constructor lookup (can't find constructor with
"const void**" argument)
Product: gcc
Version: 4.0.0
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: benoit at zeroc dot com
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i686-pc-linux-gnu
GCC host triplet: i686-pc-linux-gnu
GCC target triplet: i686-pc-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21340
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/21340] [4.0/4.1 Regression] error in constructor lookup (can't find constructor with "const void**" argument)
2005-05-02 16:31 [Bug c++/21340] New: error in constructor lookup (can't find constructor with "const void**" argument) benoit at zeroc dot com
@ 2005-05-02 17:15 ` pinskia at gcc dot gnu dot org
2005-05-28 5:10 ` mmitchel at gcc dot gnu dot org
` (3 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2005-05-02 17:15 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2005-05-02 17:15 -------
Confirmed, reduced testcase:
struct Base{};
struct Iterator : virtual Base {};
bool operator==(const Iterator&, const Iterator&);
struct IteratorI : Iterator {};
struct Obj
{
bool operator==(const Obj&) const;
};
template <int>bool dummy()
{
Obj lhs, rhs;
return lhs == rhs;
}
int
main(int argc, char** argv)
{
//Iterator* it1 = new Iterator();
IteratorI* it2 = new IteratorI();
}
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Ever Confirmed| |1
Keywords| |ice-on-valid-code, rejects-
| |valid
Last reconfirmed|0000-00-00 00:00:00 |2005-05-02 17:15:32
date| |
Summary|error in constructor lookup |[4.0/4.1 Regression] error
|(can't find constructor with|in constructor lookup (can't
|"const void**" argument) |find constructor with "const
| |void**" argument)
Target Milestone|--- |4.0.1
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21340
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/21340] [4.0/4.1 Regression] error in constructor lookup (can't find constructor with "const void**" argument)
2005-05-02 16:31 [Bug c++/21340] New: error in constructor lookup (can't find constructor with "const void**" argument) benoit at zeroc dot com
2005-05-02 17:15 ` [Bug c++/21340] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
@ 2005-05-28 5:10 ` mmitchel at gcc dot gnu dot org
2005-05-29 0:17 ` cvs-commit at gcc dot gnu dot org
` (2 subsequent siblings)
4 siblings, 0 replies; 6+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-05-28 5:10 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
AssignedTo|unassigned at gcc dot gnu |mark at codesourcery dot com
|dot org |
Status|NEW |ASSIGNED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21340
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/21340] [4.0/4.1 Regression] error in constructor lookup (can't find constructor with "const void**" argument)
2005-05-02 16:31 [Bug c++/21340] New: error in constructor lookup (can't find constructor with "const void**" argument) benoit at zeroc dot com
2005-05-02 17:15 ` [Bug c++/21340] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-05-28 5:10 ` mmitchel at gcc dot gnu dot org
@ 2005-05-29 0:17 ` cvs-commit at gcc dot gnu dot org
2005-05-29 0:20 ` cvs-commit at gcc dot gnu dot org
2005-05-29 2:09 ` mmitchel at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-05-29 0:17 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-05-29 00:16 -------
Subject: Bug 21340
CVSROOT: /cvs/gcc
Module name: gcc
Changes by: mmitchel@gcc.gnu.org 2005-05-29 00:16:05
Modified files:
gcc/cp : ChangeLog method.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/init: ctor6.C
Log message:
PR c++/21340
* method.c (implicitly_declare_fn): Clear processing_template_decl
when generating implicit declaration.
PR c++/21340
* g++.dg/init/ctor6.C: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&r1=1.4763&r2=1.4764
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/method.c.diff?cvsroot=gcc&r1=1.329&r2=1.330
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&r1=1.5551&r2=1.5552
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/init/ctor6.C.diff?cvsroot=gcc&r1=NONE&r2=1.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21340
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/21340] [4.0/4.1 Regression] error in constructor lookup (can't find constructor with "const void**" argument)
2005-05-02 16:31 [Bug c++/21340] New: error in constructor lookup (can't find constructor with "const void**" argument) benoit at zeroc dot com
` (2 preceding siblings ...)
2005-05-29 0:17 ` cvs-commit at gcc dot gnu dot org
@ 2005-05-29 0:20 ` cvs-commit at gcc dot gnu dot org
2005-05-29 2:09 ` mmitchel at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: cvs-commit at gcc dot gnu dot org @ 2005-05-29 0:20 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From cvs-commit at gcc dot gnu dot org 2005-05-29 00:17 -------
Subject: Bug 21340
CVSROOT: /cvs/gcc
Module name: gcc
Branch: gcc-4_0-branch
Changes by: mmitchel@gcc.gnu.org 2005-05-29 00:17:34
Modified files:
gcc/cp : ChangeLog method.c
gcc/testsuite : ChangeLog
Added files:
gcc/testsuite/g++.dg/init: ctor6.C
Log message:
PR c++/21340
* method.c (implicitly_declare_fn): Clear processing_template_decl
when generating implicit declaration.
PR c++/21340
* g++.dg/init/ctor6.C: New test.
Patches:
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.4648.2.48&r2=1.4648.2.49
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/cp/method.c.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.322.4.1&r2=1.322.4.2
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/ChangeLog.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=1.5084.2.204&r2=1.5084.2.205
http://gcc.gnu.org/cgi-bin/cvsweb.cgi/gcc/gcc/testsuite/g++.dg/init/ctor6.C.diff?cvsroot=gcc&only_with_tag=gcc-4_0-branch&r1=NONE&r2=1.1.2.1
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21340
^ permalink raw reply [flat|nested] 6+ messages in thread
* [Bug c++/21340] [4.0/4.1 Regression] error in constructor lookup (can't find constructor with "const void**" argument)
2005-05-02 16:31 [Bug c++/21340] New: error in constructor lookup (can't find constructor with "const void**" argument) benoit at zeroc dot com
` (3 preceding siblings ...)
2005-05-29 0:20 ` cvs-commit at gcc dot gnu dot org
@ 2005-05-29 2:09 ` mmitchel at gcc dot gnu dot org
4 siblings, 0 replies; 6+ messages in thread
From: mmitchel at gcc dot gnu dot org @ 2005-05-29 2:09 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From mmitchel at gcc dot gnu dot org 2005-05-29 00:20 -------
Fixed in 4.0.1.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21340
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2005-05-29 0:20 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-05-02 16:31 [Bug c++/21340] New: error in constructor lookup (can't find constructor with "const void**" argument) benoit at zeroc dot com
2005-05-02 17:15 ` [Bug c++/21340] [4.0/4.1 Regression] " pinskia at gcc dot gnu dot org
2005-05-28 5:10 ` mmitchel at gcc dot gnu dot org
2005-05-29 0:17 ` cvs-commit at gcc dot gnu dot org
2005-05-29 0:20 ` cvs-commit at gcc dot gnu dot org
2005-05-29 2:09 ` 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).