Compiler Error
John Paden
paden@ittc.ukans.edu
Mon Jul 24 20:03:00 GMT 2000
Hello-
I found this by accident... I was playing around with pointers to
members. The example is very short so I included everything in this
message. The code doesn't do anything and shouldn't compile, but this
error might still indicate a problem that would be worth solving.
Hope this is useful,
John Paden
/*
* VERSION (Compiled on debian linux 2.2 and SunOS 5.6)
*/
// LINUX BOX
gcc version 2.95.2 20000220 (Debian GNU/Linux)
/usr/lib/gcc-lib/i386-linux/2.95.2/cpp -lang-c++ -v -D__GNUC__=2
-D__GNUG__=2 -D__GNUC_MINOR__=95 -D__cplusplus -D__ELF__ -Dunix
-D__i386__ -Dlinux -D__ELF__ -D__unix__ -D__i386__ -D__linux__ -D__unix
-D__linux -Asystem(posix) -D__EXCEPTIONS -Acpu(i386) -Amachine(i386)
-Di386 -D__i386 -D__i386__ temp.c /tmp/ccZrqf68.ii
GNU CPP version 2.95.2 20000220 (Debian GNU/Linux) (i386 Linux/ELF)
GNU C++ version 2.95.2 20000220 (Debian GNU/Linux) (i386-linux) compiled
by GNU C version 2.95.2 20000220 (Debian GNU/Linux).
// SOLARIS BOX
gcc version 2.95.2 19991024 (release)
/usr/local/lib/gcc-lib/sparc-sun-solaris2.6/2.95.2/cpp -lang-c++ -v
-D__GNUC__=2 -D__GNUG__=2 -D__GNUC_MINOR__=95 -D__cplusplus -Dsparc -Dsun
-Dunix -D__svr4__ -D__SVR4 -D__sparc__ -D__sun__ -D__unix__ -D__svr4__
-D__SVR4 -D__sparc -D__sun -D__unix -Asystem(unix) -Asystem(svr4)
-D__EXCEPTIONS -D__GCC_NEW_VARARGS__ -Acpu(sparc) -Amachine(sparc) temp.c
/var/tmp/ccl0fPqO.ii
GNU CPP version 2.95.2 19991024 (release) (sparc)
GNU C++ version 2.95.2 19991024 (release) (sparc-sun-solaris2.6) compiled
by GNU C version 2.95.2 19991024 (release).
/*
* OUTPUT
*/
% g++ temp.c
temp.c: In function `int main(int, char **, char **)':
temp.c:13: Internal compiler error.
temp.c:13: Please submit a full bug report.
temp.c:13: See <URL: http://www.gnu.org/software/gcc/bugs.html > for
instructions.
/*
* FILES
*/
temp.c:
////////////////////////////////////////////////////////////
struct sTest {
};
int main(int argc, char *argv[], char *envp[])
{
struct sTest f;
// As long as b is an int, char, struct, etc. it will produce
// the error. If it is an (int *), (*fp)(), or (sTest::*mp), etc
// the compiler catches the type mismatch.
int b;
f.*b;
}
temp.ii
////////////////////////////////////////////////////////////
# 1 "temp.c"
struct sTest {
};
int main(int argc, char *argv[], char *envp[])
{
struct sTest f;
int b;
f.*b;
}
temp.s
////////////////////////////////////////////////////////////
.file "temp.c"
.version "01.01"
gcc2_compiled.:
More information about the Gcc-bugs
mailing list