This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug c++/18391] internal error: Segmentation fault for valid code segment
- From: "asachdeva at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 9 Nov 2004 09:28:04 -0000
- Subject: [Bug c++/18391] internal error: Segmentation fault for valid code segment
- References: <20041109061223.18391.asachdeva@gmail.com>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From asachdeva at gmail dot com 2004-11-09 09:28 -------
I am planning to use the following code as workaround, which does not crash.
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
extern bool cond;
typedef int (*FuncPtr)();
FuncPtr funcPtr;
int foobar(int foo, int bar = ((cond?funcPtr:(fprintf(stderr, "problem at
%s:%s\n", __FILE__, __LINE__), (FuncPtr)0))()), int foob=8);
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18391