From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Andrew Zabolotny" To: "egcs@cygnus.com" Subject: egcs-1.0 on mingw32/possibly cygwin32 regression Date: Thu, 08 Jan 1998 01:44:00 -0000 Message-id: <199801080945.MAA20705@freya> X-SW-Source: 1998-01/msg00185.html Hello everybody! The mingw32 egcs-1.0 port and possibly cygnus-win32 egcs-1.0 (since first is heavily based on second) has the following problem: The program: --------------- #include static __attribute__ ((stdcall)) BlackHole(int a); void doit() { BlackHole(1); } static __attribute__ ((stdcall)) BlackHole(int a) { printf("disappearing function! %d\n", a); } int main() { doit(); return (0); } --------------- does not compile correctly with -O3. However, it compiles okay if the -fkeep-inline-functions or with -fno-inline-functions switch was specified. The problem is that the BlackHole function is for some reason marked as 'inline' but instead of inlining its code the compiler puts a 'call BlackHole@4' anyway, but the actual function code is totally missing. This problem is not present with gcc-2.7.2 from cygwin32. I've did not tracked the problem, but I think it's related to the ENCODE_SECTION_INFO macro in cygwin32.h (the name of function changes and compiler detects by name whenever the function is inline??? nonsense) Greetings, _\ndy@teamOS/2