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]
Other format: [Raw text]

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


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


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