[Bug c++/18391] internal error: Segmentation fault for valid code segment

asachdeva at gmail dot com gcc-bugzilla@gcc.gnu.org
Tue Nov 9 09:28:00 GMT 2004


------- 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



More information about the Gcc-bugs mailing list