This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project. See the Cygwin home page for more information.
Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

egcs-1.1.2: compiler crash with stdcall, cdecl attributes


Compiling the following program makes compiler to crash (cc1 dumps core.)
I am now using cygwin b20.1 and egcs-1.1.2 compiler, but found that
plain cygwin b20 compiler has the same problem while b19.1 not.

-----
# define ATTR __attribute__((stdcall)) /* */
/* # define ATTR __attribute__((cdecl)) /* this also */

void f1()
{
	void (ATTR *pf)(void);
}

void f2()
{
	void (ATTR *pf)(void);
}
-----

The conditions looks like:

1. Two functions, each has a local variable of type pointer to function.
   (Two variables in the same function does not cause problem.)
2. Both function pointers are declared with stdcall or cdecl attribute.
   (If one is stdcall and another is cdecl, the problem does not occur.)
3. Also, both function pointers are declared with prototypes.

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com