This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
bug in egcs-2.91.66
- To: egcs-bugs at egcs dot cygnus dot com
- Subject: bug in egcs-2.91.66
- From: Joern Beutner <beutnert at pi dot tu-berlin dot de>
- Date: Wed, 31 Mar 1999 17:38:06 +0200
- Reply-To: "Joern Beutner" <beutner at pi dot tu-berlin dot de>
Hallo,
compiling the following source with the g++ (version egcs-2.91.66) produces an
undefined reference with a wrong dimensioned parameter:
typedef int (*Type)[3];
class A {
public:
A( Type );
};
int main () {
int d[3] = {1,2,3};
Type t = &d;
A a( t );
return 0;
}
Of course, when compiling and linking this source, the linker has to
fail because of the missing reference to A::A(...), but the linker
produce to following output:
/usr/tmp/ccGzquPM.o: In function `main':
/usr/tmp/ccGzquPM.o(.text+0xb): undefined reference to `A::A(int (*)[2])'
instead of (produce by a egcs-2.90.29 980515 (egcs-1.0.3 release)):
/usr/tmp/cca324731.o: In function `main':
/usr/tmp/cca324731.o(.text+0xb): undefined reference to `A::A(int (*)[3])'
The dimension of the parameter is 'reduced' from `A::A(int (*)[3])' to
`A::A(int (*)[2])' by the new compiler.
Thanks for help,
Joern Beutner
--
Technische Universitaet Berlin, Germany