From: Ranjit M. <rm...@ho...> - 2002-11-19 20:59:19
|
FWIW, I'm also seeing the same problem with GCC 3.2 on Linux but not with GCC 2.95.3. Should I file a PR about this? Ranjit. Ranjit Mathew wrote: > Hi, > > For even more fun, consider the following > source file ("bar.c"): > -------------------------- 8< ----------------------------- > extern int * (__attribute__((stdcall)) *fooPtr)( void); > > int * __attribute__((stdcall)) myFn01( void) { return 0; } > > void snafu( void) > { > fooPtr = myFn01; > } > -------------------------- 8< ----------------------------- > > This is an equivalent form that exhibits the same problem with > g++ (but not gcc). > > The fun part is that if you replace all "stdcall" by > "cdecl" the problem disappears, while it reappears if > you replace it with "fastcall" instead! > > This leads me to believe that this is a target-specific > problem and not a general problem in the C++ front-end. > > Sincerely Yours, > Ranjit. > -- Ranjit Mathew Email: rmathew AT hotmail DOT com Bangalore, INDIA. Web: http://ranjitmathew.tripod.com/ |