This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

GCC 2.95.2: internal compiler error 159 with invalid static_cast


gcc version: 2.95.2
system type: Debian GNU/Linux 2.2 (kernel 2.2.7), GNU libc 2.1.2

Dear Sirs,

I was trying to do a static_cast from void* to a function pointer in
g++ and used a slightly wrong syntax.  The compiler crashed with an
internal compiler error.  Here is a simplified version of the bug
(triggered by the "const" keyword):

$ cat > /tmp/error.C << EOF
void* f;
void g () {
  static_cast<int(*)(int)const>(f) (42);     
}
EOF
$ g++ -c /tmp/error.C
/tmp/error.C: In function `void g()':
/tmp/error.C:3: Internal compiler error 159.
/tmp/error.C:3: Please submit a full bug report.
/tmp/error.C:3: See <URL:http://www.gnu.org/software/gcc/faq.html#bugreport> for instructions.

Best regards,

	Marko Mäkelä

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]